Commit a3e44f99 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Don't close the connection in connectionTimeout event, because this job is done

in event.py, now before trigger the event. It's thread-safe because the
connection is locked around the close().


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1097 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5dfc4fdb
......@@ -61,16 +61,6 @@ class BaseHandler(EventHandler):
for queue in queue_set:
queue.put((conn, None))
def timeoutExpired(self, conn):
super(BaseHandler, self).timeoutExpired(conn)
# XXX: in event.py, the connection is closed after trigger this event,
# so this should not be closed here, but the lock must remains...
conn.lock()
try:
conn.close()
finally:
conn.release()
def unexpectedInAnswerHandler(*args, **kw):
raise Exception('Unexpected event in an answer handler')
......
......@@ -52,8 +52,8 @@ class IdleEvent(object):
try:
logging.info('timeout for %r with %s:%d',
self._id, *(conn.getAddress()))
conn.getHandler().timeoutExpired(conn)
conn.close()
conn.getHandler().timeoutExpired(conn)
return True
finally:
conn.unlock()
......
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