Skip to content

Commit

Permalink
fix: fail to set KeepAliveIntervall #715
Browse files Browse the repository at this point in the history
  • Loading branch information
Larvan2 committed Sep 25, 2023
1 parent 0dfe696 commit fdd327d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/net/tcpip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit fdd327d

Please sign in to comment.