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

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

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

Loading…
Cancel
Save