diff --git a/amqtt/client.py b/amqtt/client.py index 8da9aba..2243a62 100644 --- a/amqtt/client.py +++ b/amqtt/client.py @@ -533,7 +533,7 @@ class MQTTClient: while self.client_tasks: task = self.client_tasks.popleft() if not task.done(): - task.cancel() + task.cancel(msg="Connection closed.") self.logger.debug("Monitoring broker disconnection") # Wait for disconnection from broker (like connection lost)