From b6a2bd37b18ebc68c615729a3ba3825e17d5ebdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Mon, 24 Jul 2023 19:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=BF=9E=E6=8E=A5=E4=B8=AD?= =?UTF-8?q?=E7=9A=84Linger=E8=AE=BE=E7=BD=AE=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E6=9C=89=E4=BA=9B=E5=8F=8D=E5=90=91=E4=BB=A3=E7=90=86=E5=9C=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=AA=E5=8F=91=E9=80=81=E5=89=8D=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/client_conn.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/nodes/client_conn.go b/internal/nodes/client_conn.go index 416b905..88a844c 100644 --- a/internal/nodes/client_conn.go +++ b/internal/nodes/client_conn.go @@ -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()) {