Quellcode durchsuchen

Update Worker.php

walkor vor 8 Jahren
Ursprung
Commit
152756a04f
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      Worker.php

+ 4 - 2
Worker.php

@@ -468,8 +468,10 @@ class Worker
             self::$logFile = __DIR__ . '/../workerman.log';
         }
         $log_file = (string)self::$logFile;
-        touch($log_file);
-        chmod($log_file, 0622);
+        if (!is_file($log_file)) {
+            touch($log_file);
+            chmod($log_file, 0622);
+        }
 
         // State.
         self::$_status = self::STATUS_STARTING;