issue #406: don't leak side FDs on bootstrap failure.

issue260
David Wilson 6 years ago
parent 14b389cb46
commit 375182b71b

@ -1152,10 +1152,14 @@ class Stream(mitogen.core.Stream):
try: try:
self._connect_bootstrap(extra_fd) self._connect_bootstrap(extra_fd)
except EofError: except EofError:
self.receive_side.close()
self.transmit_side.close()
e = sys.exc_info()[1] e = sys.exc_info()[1]
self._adorn_eof_error(e) self._adorn_eof_error(e)
raise raise
except Exception: except Exception:
self.receive_side.close()
self.transmit_side.close()
self._reap_child() self._reap_child()
raise raise

Loading…
Cancel
Save