From d739217162df8d0cde4f67964de1c0baf3115829 Mon Sep 17 00:00:00 2001 From: Andrew Mirsky Date: Thu, 5 Jun 2025 08:24:13 -0400 Subject: [PATCH] fixes #116 : adding reason message to task cancellation on lost connection --- amqtt/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)