plugin XEP-0060: fix exception on _node_cb modification:
Due to the yielding, `_node_cb` could be modified during node event management, resulting in an exception. The items are now shallow copied to avoid issue.
This commit is contained in:
parent
831f1ad78b
commit
a539c21f9d
1 changed files with 1 additions and 1 deletions
|
|
@ -1989,7 +1989,7 @@ class SatPubSubClient(rsm.PubSubClient):
|
|||
@param event(unicode): one of C.PS_ITEMS, C.PS_RETRACT, C.PS_DELETE
|
||||
@return (iterator[callable]): callbacks for this node/event
|
||||
"""
|
||||
for registered_node, monitor_data in self.parent_plugin._node_cb.items():
|
||||
for registered_node, monitor_data in list(self.parent_plugin._node_cb.items()):
|
||||
if monitor_data.strict_match:
|
||||
if node != registered_node:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue