Browse Source

bug fix: receive while callback added

master
Dirk Alders 2 years ago
parent
commit
79ac04ffdb
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py View File

@@ -83,7 +83,7 @@ class mqtt_client(object):
83 83
 
84 84
     def __receive__(self, client, userdata, message):
85 85
         logger.debug("Received message with topic %s and payload %s", message.topic, str(message.payload))
86
-        for topic in self.__callbacks__:
86
+        for topic in self.__callbacks__.copy():
87 87
             if topic.endswith('#'):
88 88
                 if message.topic.startswith(topic[:-1]):
89 89
                     self.__callbacks__[topic](client, userdata, message)

Loading…
Cancel
Save