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();