瀏覽代碼

is_resource check

walkor 10 年之前
父節點
當前提交
2ae36a1e64
共有 1 個文件被更改,包括 1 次插入1 次删除
  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']++;