فهرست منبع

Fix force kill when reloading and timeout reached.

Ares 8 سال پیش
والد
کامیت
7822308789
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      Worker.php

+ 3 - 1
Worker.php

@@ -1330,7 +1330,9 @@ class Worker
             // Send reload signal to a worker process.
             posix_kill($one_worker_pid, $sig);
             // If the process does not exit after self::KILL_WORKER_TIMER_TIME seconds try to kill it.
-            Timer::add(self::KILL_WORKER_TIMER_TIME, 'posix_kill', array($one_worker_pid, SIGKILL), false);
+            if(!self::$_gracefulStop){
+                Timer::add(self::KILL_WORKER_TIMER_TIME, 'posix_kill', array($one_worker_pid, SIGKILL), false);
+            }
         } // For child processes.
         else {
             reset(self::$_workers);