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:
parent
ca2b4a188a
commit
70af52d74c
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue