1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +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) {
// 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();
}