walkor vor 1 Jahr
Ursprung
Commit
e562b07c25
2 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/Connection/AsyncTcpConnection.php
  2. 3 0
      src/Connection/TcpConnection.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 === '\\' && $this->eventLoop && method_exists($this->eventLoop, 'offExcept')) {
+        if (DIRECTORY_SEPARATOR === '\\' && method_exists($this->eventLoop, 'offExcept')) {
             $this->eventLoop->offExcept($this->socket);
         }
         // Remove write listener.

+ 3 - 0
src/Connection/TcpConnection.php

@@ -1002,6 +1002,9 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
         // Remove event listener.
         $this->eventLoop->offReadable($this->socket);
         $this->eventLoop->offWritable($this->socket);
+        if (DIRECTORY_SEPARATOR === '\\' && method_exists($this->eventLoop, 'offExcept')) {
+            $this->eventLoop->offExcept($this->socket);
+        }
 
         // Close socket.
         try {