issue #146: don't crash during on_broker_shutdown

There is some insane unidentifiable Mitogen context (the local context?)
that instantly crashes with a higher forks setting. It appears to be
harmless, but meanwhile this naturally shouldn't be happening.
wip-fakessh-exit-status
David Wilson 6 years ago
parent cb620500d1
commit 44d36eccba

@ -531,6 +531,9 @@ class Importer(object):
os.environ['PBR_VERSION'] = '0.0.0'
def _on_load_module(self, msg):
if msg == _DEAD:
return
tup = msg.unpickle()
fullname = tup[0]
_v and LOG.debug('Importer._on_load_module(%r)', fullname)
@ -1285,7 +1288,7 @@ class ExternalContext(object):
def _on_shutdown_msg(self, msg):
_v and LOG.debug('_on_shutdown_msg(%r)', msg)
if msg.src_id != mitogen.parent_id:
if msg != _DEAD and msg.src_id != mitogen.parent_id:
LOG.warning('Ignoring SHUTDOWN from non-parent: %r', msg)
return
self.broker.shutdown()

Loading…
Cancel
Save