From 79ac04ffdb61ea61334b2bb90bee565472957657 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Wed, 21 Dec 2022 14:23:11 +0100 Subject: [PATCH] bug fix: receive while callback added --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b853f6e..ce20ae1 100644 --- a/__init__.py +++ b/__init__.py @@ -83,7 +83,7 @@ class mqtt_client(object): def __receive__(self, client, userdata, message): logger.debug("Received message with topic %s and payload %s", message.topic, str(message.payload)) - for topic in self.__callbacks__: + for topic in self.__callbacks__.copy(): if topic.endswith('#'): if message.topic.startswith(topic[:-1]): self.__callbacks__[topic](client, userdata, message)