Parcourir la source

Check $this->eventLoop empty

walkor il y a 1 an
Parent
commit
310f582f15
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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.