|
|
|
|
83
|
|
83
|
|
84
|
def __receive__(self, client, userdata, message):
|
84
|
def __receive__(self, client, userdata, message):
|
85
|
logger.debug("Received message with topic %s and payload %s", message.topic, str(message.payload))
|
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
|
if topic.endswith('#'):
|
87
|
if topic.endswith('#'):
|
88
|
if message.topic.startswith(topic[:-1]):
|
88
|
if message.topic.startswith(topic[:-1]):
|
89
|
self.__callbacks__[topic](client, userdata, message)
|
89
|
self.__callbacks__[topic](client, userdata, message)
|