diff --git a/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java b/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java index 0f885a4e..ca62ae08 100644 --- a/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java +++ b/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsCallback.java @@ -258,6 +258,12 @@ public void run() { synchronized (lifecycle) { current_state = State.STOPPED; } + + for (MqttToken token : completeQueue) { + log.warning(CLASS_NAME, methodName, String.format("uncompleted action %s %s %x", token, token.internalTok, token.internalTok.hashCode())); + token.getActionCallback().onFailure(token, new MqttException(MqttException.REASON_CODE_CLIENT_CLOSED)); + + } } private void handleActionComplete(MqttToken token)