Commit 3bf17279 authored by Vincent Pelletier's avatar Vincent Pelletier

Don't let polling thread die from any exception. Instead, emit a log with...

Don't let polling thread die from any exception. Instead, emit a log with exception traceback and retry polling.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@797 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 15a469dc
...@@ -33,10 +33,8 @@ class ThreadedPoll(Thread): ...@@ -33,10 +33,8 @@ class ThreadedPoll(Thread):
# First check if we receive any new message from other node # First check if we receive any new message from other node
try: try:
self.em.poll() self.em.poll()
except KeyError: except:
# This happen when there is no connection logging.error('poll raised, retrying', exc_info=1)
# XXX: This should be handled inside event manager, not here.
logging.error('Dispatcher, run, poll returned a KeyError')
logging.info('Threaded poll stopped') logging.info('Threaded poll stopped')
def stop(self): def stop(self):
......
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