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):
break
else:
if conn.isClosed():
return
# Use the thread that created the packet to reinject it,
# to avoid a race condition on Connector.queued.
conn.em.wakeup(lambda conn=conn, packet=packet:
conn.isClosed() or cls._addPacket(conn, packet))
queue.clear()
else:
# Use the thread that created the packet to reinject it,
# to avoid a race condition on Connector.queued.
conn.em.wakeup(lambda conn=conn, packet=packet:
conn.isClosed() or cls._addPacket(conn, packet))
continue
break
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