mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +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:
parent
b7465e8200
commit
7d129d6f6c
1 changed files with 2 additions and 6 deletions
|
@ -949,12 +949,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
StreamError streamError = PacketParserUtils.parseStreamError(parser);
|
StreamError streamError = PacketParserUtils.parseStreamError(parser);
|
||||||
currentXmppException = new StreamErrorException(streamError);
|
// Stream errors are non recoverable, throw this exceptions. Also note that this will set
|
||||||
// Mark the tlsHandled sync point as success, we will use the saslFeatureReceived sync
|
// this exception as current connection exceptions and notify any waiting threads.
|
||||||
// point to report the error, which is checked immediately after tlsHandled in
|
|
||||||
// connectInternal().
|
|
||||||
tlsHandled = true;
|
|
||||||
notifyWaiters();
|
|
||||||
throw new StreamErrorException(streamError);
|
throw new StreamErrorException(streamError);
|
||||||
case "features":
|
case "features":
|
||||||
parseFeaturesAndNotify(parser);
|
parseFeaturesAndNotify(parser);
|
||||||
|
|
Loading…
Reference in a new issue