add some status protection
This commit is contained in:
parent
d88d2802b0
commit
a185e1671b
3 changed files with 18 additions and 4 deletions
|
@ -204,9 +204,11 @@ class EventLoop(object):
|
|||
logging.error(e)
|
||||
continue
|
||||
for handler in self._handlers:
|
||||
# no exceptions should be raised by users
|
||||
# TODO when there are a lot of handlers
|
||||
handler(events)
|
||||
try:
|
||||
handler(events)
|
||||
except (OSError, IOError) as e:
|
||||
logging.error(e)
|
||||
|
||||
|
||||
# from tornado
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue