mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +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;
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue