From 04a8da4856be42438b5967ea735bd4e5d0e26cf6 Mon Sep 17 00:00:00 2001 From: gVisor bot 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) } }