From 8cb5e05fc904c7a7e629ded2e28ab7d214eff627 Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Tue, 14 Feb 2017 15:19:29 -0800 Subject: [PATCH] clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0 --- clientv3/lease.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientv3/lease.go b/clientv3/lease.go index 71f757939..2ef5df389 100644 --- a/clientv3/lease.go +++ b/clientv3/lease.go @@ -255,7 +255,7 @@ func (l *lessor) KeepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAlive for { resp, err := l.keepAliveOnce(ctx, id) if err == nil { - if resp.TTL == 0 { + if resp.TTL <= 0 { err = rpctypes.ErrLeaseNotFound } return resp, err