mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-18 02:02:04 +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