Skip to content

Commit

Permalink
fix set KeepAliveIntervall
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Sep 25, 2023
1 parent acb5f59 commit 750b7c3
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 @@ -10,6 +10,6 @@ var KeepAliveInterval time.Duration
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 750b7c3

Please sign in to comment.