去除连接中的Linger设置,防止有些反向代理在数据未发送前关闭连接

This commit is contained in:
刘祥超
2023-07-24 19:22:22 +08:00
parent 3e60c9913a
commit b6a2bd37b1

View File

@@ -129,11 +129,6 @@ func (this *ClientConn) Read(b []byte) (n int, err error) {
// 检测是否为超时错误
var isTimeout = err != nil && os.IsTimeout(err)
var isHandshakeError = isTimeout && !this.hasRead
if isTimeout {
_ = this.SetLinger(0)
} else {
_ = this.SetLinger(nodeconfigs.DefaultTCPLinger)
}
// 忽略白名单和局域网
if !this.isPersistent && this.isHTTP && !this.isInAllowList && !utils.IsLocalIP(this.RawIP()) {