Ver Fonte

Check $this->eventLoop empty

walkor há 1 ano atrás
pai
commit
310f582f15
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/Connection/AsyncTcpConnection.php

+ 1 - 1
src/Connection/AsyncTcpConnection.php

@@ -365,7 +365,7 @@ class AsyncTcpConnection extends TcpConnection
     public function checkConnection(): void
     {
         // Remove EV_EXPECT for windows.
-        if (DIRECTORY_SEPARATOR === '\\' && method_exists($this->eventLoop, 'offExcept')) {
+        if (DIRECTORY_SEPARATOR === '\\' && $this->eventLoop && method_exists($this->eventLoop, 'offExcept')) {
             $this->eventLoop->offExcept($this->socket);
         }
         // Remove write listener.