1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-26 14:17:57 +01:00

[tcp] Mark SM sync points as volatile

This commit is contained in:
Florian Schmaus 2020-06-12 21:16:05 +02:00
parent fd1b49ca8f
commit cf1f533fff

View file

@ -190,10 +190,22 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
*/
private String smSessionId;
private SyncPointState smResumedSyncPoint;
/**
* Represents the state of stream management resumption.
* <p>
* Unlike other sync points, this sync point is marked volatile because it is also read by the reader thread.
* </p>
*/
private volatile SyncPointState smResumedSyncPoint;
private Failed smResumptionFailed;
private boolean smEnabledSyncPoint;
/**
* Represents the state of stream magement.
* <p>
* This boolean is marked volatile as it is read by various threads, including the reader thread via {@link #isSmEnabled()}.
* </p>
*/
private volatile boolean smEnabledSyncPoint;
/**
* The client's preferred maximum resumption time in seconds.