From 1630b44b8df8643ab5ca684a571f50ff88bc9700 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 8 Feb 2015 14:10:47 +0100 Subject: [PATCH] Reset smSessionId on XMPPTCPConnection.disconnect() --- .../java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 4 ++++ 1 file changed, 4 insertions(+) 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 ca20d177c..0588f8ece 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 @@ -482,6 +482,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { usingTLS = false; 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();