Explorar o código

is_resource check

walkor %!s(int64=10) %!d(string=hai) anos
pai
achega
2ae36a1e64
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Connection/TcpConnection.php

+ 1 - 1
Connection/TcpConnection.php

@@ -254,7 +254,7 @@ class TcpConnection extends ConnectionInterface
             else
             {
                 // 如果连接断开
-                if(feof($this->_socket))
+                if(feof($this->_socket) || !is_resource($this->_socket))
                 {
                     // status统计发送失败次数
                     self::$statistics['send_fail']++;