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):
# First check if we receive any new message from other node
try:
self.em.poll()
except KeyError:
# This happen when there is no connection
# XXX: This should be handled inside event manager, not here.
logging.error('Dispatcher, run, poll returned a KeyError')
except:
logging.error('poll raised, retrying', exc_info=1)
logging.info('Threaded poll stopped')
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