1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-30 02:02:06 +01:00

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
This commit is contained in:
Matt Tucker 2007-02-19 08:38:19 +00:00 committed by matt
parent 2e5f42aa39
commit 3aa94b2a4e

View file

@ -562,6 +562,11 @@ public class XMPPConnection {
protected void shutdown(Presence unavailablePresence) { protected void shutdown(Presence unavailablePresence) {
// Set presence to offline. // Set presence to offline.
packetWriter.sendPacket(unavailablePresence); packetWriter.sendPacket(unavailablePresence);
this.setWasAuthenticated(authenticated);
authenticated = false;
connected = false;
packetReader.shutdown(); packetReader.shutdown();
packetWriter.shutdown(); packetWriter.shutdown();
// Wait 150 ms for processes to clean-up, then shutdown. // Wait 150 ms for processes to clean-up, then shutdown.
@ -591,10 +596,6 @@ public class XMPPConnection {
// Ignore. // Ignore.
} }
this.setWasAuthenticated(authenticated);
authenticated = false;
connected = false;
saslAuthentication.init(); saslAuthentication.init();
} }