Explorar o código

check valid stream

walkor %!s(int64=6) %!d(string=hai) anos
pai
achega
89831799e9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Connection/AsyncTcpConnection.php

+ 1 - 1
Connection/AsyncTcpConnection.php

@@ -189,7 +189,7 @@ class AsyncTcpConnection extends TcpConnection
                 STREAM_CLIENT_ASYNC_CONNECT);
         }
         // If failed attempt to emit onError callback.
-        if (!$this->_socket) {
+        if (!$this->_socket || !is_resource($this->_socket)) {
             $this->emitError(WORKERMAN_CONNECT_FAIL, $errstr);
             if ($this->_status === self::STATUS_CLOSING) {
                 $this->destroy();