Add EOFError to nanny multiprocessing.queue except list
@@ -853,12 +853,13 @@ class WorkerProcess:
"""
try:
msg = child_stop_q.get()
- except (TypeError, OSError):
+ except (TypeError, OSError, EOFError):
logger.error("Worker process died unexpectedly")
msg = {"op": "stop"}
finally:
child_stop_q.close()
- assert msg.pop("op") == "stop"
+ assert msg["op"] == "stop", msg
+ del msg["op"]
loop.add_callback(do_stop, **msg)
thread = threading.Thread(
