walkor пре 10 година
родитељ
комит
4cf55fc3db
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      Workerman/Connection/TcpConnection.php

+ 4 - 1
Workerman/Connection/TcpConnection.php

@@ -559,7 +559,10 @@ class TcpConnection extends ConnectionInterface
                echo $e;
            }
        }
-       unset($this->worker->connections[(int)$this->_socket]);
+       if($this->worker)
+       {
+           unset($this->worker->connections[(int)$this->_socket]);
+       }
        Worker::$globalEvent->del($this->_socket, EventInterface::EV_READ);
        Worker::$globalEvent->del($this->_socket, EventInterface::EV_WRITE);
        @fclose($this->_socket);