Chore: adjust the keep-alive time

This commit is contained in:
Dreamacro 2018-10-01 19:42:15 +08:00
parent 04e05c6a85
commit 16c9445459

View File

@ -88,6 +88,6 @@ func selectFast(in chan interface{}) chan interface{} {
func tcpKeepAlive(c net.Conn) {
if tcp, ok := c.(*net.TCPConn); ok {
tcp.SetKeepAlive(true)
tcp.SetKeepAlivePeriod(3 * time.Minute)
tcp.SetKeepAlivePeriod(30 * time.Second)
}
}