Explorar el Código

bug fix: receive while callback added

master
Dirk Alders hace 1 año
padre
commit
79ac04ffdb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py Ver fichero

@@ -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…
Cancelar
Guardar