[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:
Florian Schmaus 2022-04-30 15:06:15 +02:00
parent 95ff591c14
commit 0e0c0a4093
1 changed files with 1 additions and 1 deletions

View File

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