summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-01-25 09:56:53 +0100
committermathieui <mathieui@mathieui.net>2021-01-28 17:54:40 +0100
commitefdcd396d8b7314e29212c31869a725a72ef5f78 (patch)
tree2a026e925422afe0b56aaf28ed6c1febdd28212e
parent0eed84d0b2fe144850a082feb339187bd98a4817 (diff)
downloadslixmpp-efdcd396d8b7314e29212c31869a725a72ef5f78.tar.gz
slixmpp-efdcd396d8b7314e29212c31869a725a72ef5f78.tar.bz2
slixmpp-efdcd396d8b7314e29212c31869a725a72ef5f78.tar.xz
slixmpp-efdcd396d8b7314e29212c31869a725a72ef5f78.zip
xmlstream: fix race conditions on handlers
-rw-r--r--slixmpp/xmlstream/xmlstream.py2
1 files changed, 1 insertions, 1 deletions
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)