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 146cfbee5..61b144cb8 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 @@ -1798,6 +1798,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { if (smSessionId == null) return false; + // If we are not in instant shutdown, i.e., a shutdown which leaves the connection in a resumable state, then SM resumption is not possible. + if (!packetWriter.instantShutdown) + return false; + final Long shutdownTimestamp = packetWriter.shutdownTimestamp; // Seems like we are already reconnected, report true if (shutdownTimestamp == null) {