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
@ -62,6 +62,8 @@ class Callback(BaseHandler):
|
|||||||
payload -- The matched stanza object.
|
payload -- The matched stanza object.
|
||||||
"""
|
"""
|
||||||
BaseHandler.prerun(self, payload)
|
BaseHandler.prerun(self, payload)
|
||||||
|
if self._once:
|
||||||
|
self._destroy = True
|
||||||
if self._instream:
|
if self._instream:
|
||||||
self.run(payload, True)
|
self.run(payload, True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user