Mercurial > pidgin.yaz
changeset 13153:caee920323e2
[gaim-migrate @ 15516]
We no longer send the closing of the jabber stream if we were forcibly disconnected (e.g. the Internet connection dropped and we lost our connection to the Jabber server).
For non-ssl jabber connections, this doesn't change anything. For ssl jabber connections, this prevents a possible crash if the ssl connection is now invalid... which is not a problem for the more-commonly-used Mozilla library and for GnuTLS but is a problem for OpenSSL.
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Tue, 07 Feb 2006 07:47:08 +0000 |
parents | 4bb701a8736f |
children | 0d755026832c |
files | src/protocols/jabber/jabber.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c Tue Feb 07 07:25:45 2006 +0000 +++ b/src/protocols/jabber/jabber.c Tue Feb 07 07:47:08 2006 +0000 @@ -833,7 +833,11 @@ { JabberStream *js = gc->proto_data; - jabber_send_raw(js, "</stream:stream>", -1); + /* Don't close the stream if we were forcibly disconnected, as our jabber_send_raw() will, + * at best, not go through and will, at worst, crash us. + */ + if (!gc->disconnect_timeout) + jabber_send_raw(js, "</stream:stream>", -1); if(js->gsc) { gaim_ssl_close(js->gsc);