From fdd327d58da49b0bf21b0908bc7e3d475eae63a3 Mon Sep 17 00:00:00 2001 From: Larvan2 <78135608+Larvan2@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:28:11 +0800 Subject: [PATCH] fix: fail to set KeepAliveIntervall #715 --- common/net/tcpip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/net/tcpip.go b/common/net/tcpip.go index 7bc31edd..0499e54c 100644 --- a/common/net/tcpip.go +++ b/common/net/tcpip.go @@ -51,6 +51,6 @@ func SplitHostPort(s string) (host, port string, hasPort bool, err error) { func TCPKeepAlive(c net.Conn) { if tcp, ok := c.(*net.TCPConn); ok { _ = tcp.SetKeepAlive(true) - _ = tcp.SetKeepAlivePeriod(KeepAliveInterval * time.Second) + _ = tcp.SetKeepAlivePeriod(KeepAliveInterval) } }