From 3aa94b2a4e7861a734414ae5fb7694be81a3f64b Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Mon, 19 Feb 2007 08:38:19 +0000 Subject: [PATCH] Set connected to false before closing reader and writer (SMACK-196). git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7186 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index caa3d3ede..e3136413f 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -562,6 +562,11 @@ public class XMPPConnection { protected void shutdown(Presence unavailablePresence) { // Set presence to offline. packetWriter.sendPacket(unavailablePresence); + + this.setWasAuthenticated(authenticated); + authenticated = false; + connected = false; + packetReader.shutdown(); packetWriter.shutdown(); // Wait 150 ms for processes to clean-up, then shutdown. @@ -591,10 +596,6 @@ public class XMPPConnection { // Ignore. } - this.setWasAuthenticated(authenticated); - authenticated = false; - connected = false; - saslAuthentication.init(); }