From 92c76d1023238636ff8a5d34e09c6a76e02e84aa Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 10 Mar 2015 13:17:18 +0100 Subject: [PATCH] Only reset smSessionId if the stream is no longer resumeable --- .../java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index b95b16132..0812fa5f4 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -513,6 +513,9 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { disconnectedButResumeable = true; } else { disconnectedButResumeable = false; + // Reset the stream management session id to null, since if the stream is cleanly closed, i.e. sending a closing + // stream tag, there is no longer a stream to resume. + smSessionId = null; } authenticated = false; connected = false; @@ -520,9 +523,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { reader = null; writer = null; - // Reset the stream management session id to null, since if the stream is cleanly closed, i.e. sending a closing - // stream tag, there is no longer a stream to resume. - smSessionId = null; maybeCompressFeaturesReceived.init(); compressSyncPoint.init(); smResumedSyncPoint.init();