core: ensure 'exit' signal fires even on Broker crash.

pull/607/head
David Wilson 6 years ago
parent d6faff06c1
commit 3b585b841e

@ -3272,7 +3272,10 @@ class Broker(object):
self._broker_exit() self._broker_exit()
def _broker_main(self): def _broker_main(self):
try:
_profile_hook('mitogen.broker', self._do_broker_main) _profile_hook('mitogen.broker', self._do_broker_main)
finally:
# 'finally' to ensure _on_broker_exit() can always SIGTERM.
fire(self, 'exit') fire(self, 'exit')
def shutdown(self): def shutdown(self):

Loading…
Cancel
Save