Commit 38bcfed0 authored by Vincent Pelletier's avatar Vincent Pelletier

Avoid pushing fake packet more than once per queue for a given connection.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1770 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e8abb19b
...@@ -70,9 +70,12 @@ class Dispatcher: ...@@ -70,9 +70,12 @@ class Dispatcher:
try: try:
message_table = self.message_table.pop(id(conn), EMPTY) message_table = self.message_table.pop(id(conn), EMPTY)
finally: finally:
self.message_table_lock_release() notified_set = set()
for queue in message_table.itervalues(): for queue in message_table.itervalues():
queue.put((conn, None)) queue_id = id(queue)
if queue_id not in notified_set:
queue.put((conn, None))
notified_set.add(queue_id)
def registered(self, conn): def registered(self, conn):
"""Check if a connection is registered into message table.""" """Check if a connection is registered into message table."""
......
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