浏览代码

Merge pull request #88 from Garveens-Forks/master

Avoid a problem which caused by docker always use a same pid
walkor 9 年之前
父节点
当前提交
b6f44f13b7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Worker.php

+ 1 - 1
Worker.php

@@ -611,7 +611,7 @@ class Worker
         $master_is_alive = $master_pid && @posix_kill($master_pid, 0);
         // Master is still alive?
         if ($master_is_alive) {
-            if ($command === 'start') {
+            if ($command === 'start' && posix_getpid() != $master_pid) {
                 self::log("Workerman[$start_file] already running");
                 exit;
             }