From f3e93cef32470df728fd047262959a58a8ad4590 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 13 Apr 2020 22:50:02 +0200 Subject: [PATCH] core: do not init() closingStreamReceived sync point in initState() The initState() method is also called in disconnect(). And if we reset the closingStreamReceived sync point at disconnect, it will break the WaitForClosingStreamElementTest integration test. --- .../java/org/jivesoftware/smack/AbstractXMPPConnection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java index 66ebb1916..87f6f091e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java @@ -527,7 +527,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { saslFeatureReceived.init(); lastFeaturesReceived.init(); tlsHandled.init(); - closingStreamReceived.init(); + // TODO: We do not init() closingStreamReceived here, as the integration tests use it to check if we waited for + // it. } /** @@ -549,6 +550,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { // Reset the connection state initState(); + closingStreamReceived.init(); streamId = null; try {