src/protocols/jabber/jabber.c

changeset 13154
1a93fddf2a9a
parent 13051
cf92f34a0f1c
child 13201
8c224ef70efa
--- 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);

mercurial