소스 검색

fix notice

walkor 9 년 전
부모
커밋
44c8668a67
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      Worker.php

+ 7 - 3
Worker.php

@@ -1032,10 +1032,14 @@ class Worker
      */
     protected static function exitAndClearAll()
     {
-        if($this->transport === 'unix' && $this->_socketName)
+        foreach(self::$_workers as $worker)
         {
-            list(, $address) = explode(':', $this->_socketName, 2);
-            @unlink($address);
+            $socket_name = $worker->getSocketName();
+            if($worker->transport === 'unix' && $socket_name)
+            {
+                list(, $address) = explode(':', $socket_name, 2);
+                @unlink($address);
+            }
         }
         @unlink(self::$pidFile);
         self::log("Workerman[".basename(self::$_startFile)."] has been stopped");