Skip to content

Commit c5d43ff

Browse files
committed
Merge pull request #196 from surmay/issue/194
Fixes #194 - ignore shutdownConnection if ClientComms already closed
2 parents 9c9b344 + 53d07c6 commit c5d43ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • org.eclipse.paho.client.mqttv3/src/main/java-templates/org/eclipse/paho/client/mqttv3/internal

org.eclipse.paho.client.mqttv3/src/main/java-templates/org/eclipse/paho/client/mqttv3/internal/ClientComms.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public void shutdownConnection(MqttToken token, MqttException reason) {
293293
// This method could concurrently be invoked from many places only allow it
294294
// to run once.
295295
synchronized(conLock) {
296-
if (stoppingComms || closePending) {
296+
if (stoppingComms || closePending || isClosed()) {
297297
return;
298298
}
299299
stoppingComms = true;

0 commit comments

Comments
 (0)