From efdcd396d8b7314e29212c31869a725a72ef5f78 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 25 Jan 2021 09:56:53 +0100 Subject: xmlstream: fix race conditions on handlers --- slixmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index c8f797ac..77bb9e4a 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -833,7 +833,7 @@ class XMLStream(asyncio.BaseProtocol): """ log.debug("Event triggered: %s", name) - handlers = self.__event_handlers.get(name, []) + handlers = self.__event_handlers.get(name, [])[:] for handler in handlers: handler_callback, disposable = handler old_exception = getattr(data, 'exception', None) -- cgit v1.2.3