mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: fix lease keepalive duration
This commit is contained in:
parent
8c87916f68
commit
f66138d403
@ -416,7 +416,7 @@ func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// send update to all channels
|
// send update to all channels
|
||||||
nextKeepAlive := time.Now().Add(1 + time.Duration(karesp.TTL/3)*time.Second)
|
nextKeepAlive := time.Now().Add(time.Duration(karesp.TTL/3+1) * time.Second)
|
||||||
ka.deadline = time.Now().Add(time.Duration(karesp.TTL) * time.Second)
|
ka.deadline = time.Now().Add(time.Duration(karesp.TTL) * time.Second)
|
||||||
for _, ch := range ka.chs {
|
for _, ch := range ka.chs {
|
||||||
select {
|
select {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user