mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #7330 from fanminshi/fix_keepAliveOnce
clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0
This commit is contained in:
commit
ad1b754e02
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user