Fix `PeriodicCallback' when callback function return `Future' and has

`Exception' will silence ignore
This commit is contained in:
WEI Zhicheng 2014-08-06 18:35:24 +08:00 committed by Ben Darnell
parent 7550e8bb55
commit a78184f90c
1 changed files with 3 additions and 2 deletions

View File

@ -969,10 +969,11 @@ class PeriodicCallback(object):
if not self._running:
return
try:
self.callback()
return self.callback()
except Exception:
self.io_loop.handle_callback_exception(self.callback)
self._schedule_next()
finally:
self._schedule_next()
def _schedule_next(self):
if self._running: