Browse Source

Update Worker.php

walkor 4 years ago
parent
commit
9d026baf2c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Worker.php

+ 1 - 1
Worker.php

@@ -908,7 +908,7 @@ class Worker
         static::log("Workerman[$start_file] $command $mode_str");
 
         // Get master process PID.
-        $master_pid      = intval(\is_file(static::$pidFile) ? \file_get_contents(static::$pidFile) : 0);
+        $master_pid      = \is_file(static::$pidFile) ? (int)\file_get_contents(static::$pidFile) : 0)
         // Master is still alive?
         if (static::checkMasterIsAlive($master_pid)) {
             if ($command === 'start') {