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:
Goffi 2026-07-17 16:29:36 +02:00
commit a539c21f9d

View file

@ -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