Make one-off Callbacks ready for deletion after the prerun step.
Waiting until the actual run step means that the handler is not marked for deletion when checked in the __spawn_event() thread, causing the callback to stay in the handler list.
This commit is contained in:
@@ -62,6 +62,8 @@ class Callback(BaseHandler):
|
||||
payload -- The matched stanza object.
|
||||
"""
|
||||
BaseHandler.prerun(self, payload)
|
||||
if self._once:
|
||||
self._destroy = True
|
||||
if self._instream:
|
||||
self.run(payload, True)
|
||||
|
||||
|
Reference in New Issue
Block a user