mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
[tcp] Fix handling in connection exceptions when resuming a stream
Smack would previous run into "assert smResumptionFailed != null;" at line 407, since if a connection exception was encountered, waitForConditionOrConnectionException() would return, but we afterards just assumed that either SM resumption was successful or not.
This commit is contained in:
parent
95ff591c14
commit
0e0c0a4093
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
if (isSmResumptionPossible()) {
|
if (isSmResumptionPossible()) {
|
||||||
smResumedSyncPoint = SyncPointState.request_sent;
|
smResumedSyncPoint = SyncPointState.request_sent;
|
||||||
sendNonza(new Resume(clientHandledStanzasCount, smSessionId));
|
sendNonza(new Resume(clientHandledStanzasCount, smSessionId));
|
||||||
waitForConditionOrConnectionException(() -> smResumedSyncPoint == SyncPointState.successful || smResumptionFailed != null, "resume previous stream");
|
waitForConditionOrThrowConnectionException(() -> smResumedSyncPoint == SyncPointState.successful || smResumptionFailed != null, "resume previous stream");
|
||||||
if (smResumedSyncPoint == SyncPointState.successful) {
|
if (smResumedSyncPoint == SyncPointState.successful) {
|
||||||
// We successfully resumed the stream, be done here
|
// We successfully resumed the stream, be done here
|
||||||
afterSuccessfulLogin(true);
|
afterSuccessfulLogin(true);
|
||||||
|
|
Loading…
Reference in a new issue