浏览代码

Make sure all fds are removed from the hub when process is cleaned up.

Ionel Cristian Mărieș 11 年之前
父节点
当前提交
d3674b6913
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      celery/concurrency/asynpool.py

+ 6 - 0
celery/concurrency/asynpool.py

@@ -571,6 +571,12 @@ class AsynPool(_pool.Pool):
                 busy_workers.discard(inq)
             hub_remove(proc.sentinel)
             waiting_to_start.discard(proc)
+            hub_remove(proc.inqW_fd)
+            hub_remove(proc.outqR_fd)
+            if proc.synqR_fd:
+                hub_remove(proc.synqR_fd)
+            if proc.synqW_fd:
+                hub_remove(proc.synqW_fd)
         self.on_process_down = on_process_down
 
     def _create_write_handlers(self, hub,