From 4fb8d30f0a19f4ca6c1c4112e941ef80e0032b7f Mon Sep 17 00:00:00 2001 From: Xiang Date: Thu, 16 Feb 2017 11:13:40 -0800 Subject: [PATCH] clientv3: fix lease keepalive duration --- clientv3/lease.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientv3/lease.go b/clientv3/lease.go index ea81419d2..23b9c33f3 100644 --- a/clientv3/lease.go +++ b/clientv3/lease.go @@ -407,7 +407,7 @@ func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) { } // send update to all channels - nextKeepAlive := time.Now().Add(time.Duration(karesp.TTL/3+1) * time.Second) + nextKeepAlive := time.Now().Add(time.Duration(karesp.TTL+2) / 3 * time.Second) ka.deadline = time.Now().Add(time.Duration(karesp.TTL) * time.Second) for _, ch := range ka.chs { select {