Commit cd5ab5ad authored by Vincent Pelletier's avatar Vincent Pelletier

Fix r2105 when connection is closed with pending "forgotten" entries.

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6d2da919
......@@ -76,6 +76,8 @@ class Dispatcher:
notified_set = set()
queue_dict = self.queue_dict
for queue in message_table.itervalues():
if queue is NOBODY:
queue_id = id(queue)
if queue_id not in notified_set:
queue.put((conn, None))
......@@ -123,6 +123,15 @@ class DispatcherTests(unittest.TestCase):
# ...but must not have reached the queue
# Register an expectation
self.dispatcher.register(conn, 1, queue)
# ...and forget about it
self.dispatcher.forget(conn, 1)
# No exception must happen if connection is lost.
# Forgotten message's queue must not have received a "None"
if __name__ == '__main__':
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