Sfoglia il codice sorgente

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 anni fa
parent
commit
21d244b6b1
1 ha cambiato i file con 4 aggiunte e 8 eliminazioni
  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);
             }
         }
     }