1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-14 16:22:07 +01:00

[tcp] Report SM resumption impossible if not instant shutdown

If the connection got not instantanously shut down, then we also
dropped all SM state and should not report that SM resumption is
possible.

This most likely fixes SMACK-954.x
This commit is contained in:
Florian Schmaus 2024-10-17 18:10:54 +02:00
parent 6e6a3ef88d
commit 0191ed7174

View file

@ -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) {