1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 04:27:58 +01:00

[tcp] Cleanup handling of stream errors in XMPPTCPConnection

There is no need to notify waiting threads, throwing the stream error
will also notify them. Also settings tlsHandled to true is no longer
necessary.
This commit is contained in:
Florian Schmaus 2020-05-31 19:44:53 +02:00
parent b7465e8200
commit 7d129d6f6c

View file

@ -949,12 +949,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
break;
case "error":
StreamError streamError = PacketParserUtils.parseStreamError(parser);
currentXmppException = new StreamErrorException(streamError);
// Mark the tlsHandled sync point as success, we will use the saslFeatureReceived sync
// point to report the error, which is checked immediately after tlsHandled in
// connectInternal().
tlsHandled = true;
notifyWaiters();
// Stream errors are non recoverable, throw this exceptions. Also note that this will set
// this exception as current connection exceptions and notify any waiting threads.
throw new StreamErrorException(streamError);
case "features":
parseFeaturesAndNotify(parser);