Don't run handler if it doesn't exist..

This commit is contained in:
Ruud
2013-08-31 17:04:53 +02:00
parent 9c98a38604
commit 16f0bcc3ac
+2 -1
View File
@@ -676,7 +676,8 @@ class PollIOLoop(IOLoop):
while self._events:
fd, events = self._events.popitem()
try:
self._handlers[fd](fd, events)
if self._handlers.has_key(fd):
self._handlers[fd](fd, events)
except (OSError, IOError) as e:
if e.args[0] == errno.EPIPE:
# Happens when the client closes the connection