Commit 37d675f3 authored by Vincent Pelletier's avatar Vincent Pelletier

Only catch KeyErrors generated when fetching a connection to avoid hiding other exceptions.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@687 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7b0e997f
......@@ -195,26 +195,28 @@ class EpollEventManager(object):
for fd in rlist:
try:
conn = self.connection_dict[fd]
except KeyError:
pass
else:
#logging.info("conn is %s" %(conn,))
conn.lock()
try:
conn.readable()
finally:
conn.unlock()
except KeyError:
pass
for fd in wlist:
# This can fail, if a connection is closed in readable().
try:
conn = self.connection_dict[fd]
except KeyError:
pass
else:
conn.lock()
try:
conn.writable()
finally:
conn.unlock()
except KeyError:
pass
# Check idle events. Do not check them out too often, because this
# is somehow heavy.
......
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