Commit 0fd3b652 authored by Julien Muchembled's avatar Julien Muchembled

qa: fix ConnectionFilter bug causing packets to be stuck after __exit__/remove

parent f0c45ea4
...@@ -531,11 +531,12 @@ class ConnectionFilter(object): ...@@ -531,11 +531,12 @@ class ConnectionFilter(object):
break break
else: else:
if conn.isClosed(): if conn.isClosed():
return queue.clear()
# Use the thread that created the packet to reinject it, else:
# to avoid a race condition on Connector.queued. # Use the thread that created the packet to reinject it,
conn.em.wakeup(lambda conn=conn, packet=packet: # to avoid a race condition on Connector.queued.
conn.isClosed() or cls._addPacket(conn, packet)) conn.em.wakeup(lambda conn=conn, packet=packet:
conn.isClosed() or cls._addPacket(conn, packet))
continue continue
break break
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment