Преглед изворни кода

analyse fix: Offset 'running' on array{command: string, pid: int, running: bool, signaled: bool, stopped: bool, exitcode: int, termsig: int, stopsig: int} in isset() always exists and is not nullable

Chance пре 2 година
родитељ
комит
21d244b6b1
1 измењених фајлова са 4 додато и 8 уклоњено
  1. 4 8
      src/Worker.php

+ 4 - 8
src/Worker.php

@@ -1516,14 +1516,10 @@ class Worker
             $process = $processData[0];
             $startFile = $processData[1];
             $status = proc_get_status($process);
-            if (isset($status['running'])) {
-                if (!$status['running']) {
-                    static::safeEcho("process $startFile terminated and try to restart\n");
-                    proc_close($process);
-                    static::forkOneWorkerForWindows($startFile);
-                }
-            } else {
-                static::safeEcho("proc_get_status fail\n");
+            if (!$status['running']) {
+                static::safeEcho("process $startFile terminated and try to restart\n");
+                proc_close($process);
+                static::forkOneWorkerForWindows($startFile);
             }
         }
     }