Commit 8e8d61d1 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Don't execute queued events related to a closed or aborted connection.

Those events are not purged at disconnection, ignore them here.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2024 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e3c42f14
......@@ -280,6 +280,9 @@ class BaseConnection(object):
def getUUID(self):
return None
def isClosed(self):
return self.connector is None
def isAborted(self):
return False
......
......@@ -290,6 +290,8 @@ class Application(object):
p = self.event_queue.popleft
for _ in xrange(l):
some_callable, msg_id, conn, args, kwargs = p()
if conn.isAborted() or conn.isClosed():
continue
conn.setPeerId(msg_id)
some_callable(conn, *args, **kwargs)
......
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