mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2051 from xiang90/fix_keepalive
pkg/transport: enable keep alive
This commit is contained in:
commit
f98d0ef817
@ -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