mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
pkg/transport: enable keep alive
This commit is contained in:
parent
a15f39e6a2
commit
1d1a4754a7
@ -46,6 +46,7 @@ func (kln *keepaliveListener) Accept() (net.Conn, error) {
|
||||
// detection time: tcp_keepalive_time + tcp_keepalive_probes + tcp_keepalive_intvl
|
||||
// default on linux: 30 + 8 * 30
|
||||
// default on osx: 30 + 8 * 75
|
||||
tcpc.SetKeepAlive(true)
|
||||
tcpc.SetKeepAlivePeriod(30 * time.Second)
|
||||
return tcpc, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user