瀏覽代碼

bug fix: receive while callback added

master
Dirk Alders 1 年之前
父節點
當前提交
79ac04ffdb
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py 查看文件

@@ -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…
取消
儲存