Skip to content

Commit

Permalink
Merge pull request etcd-io#7330 from fanminshi/fix_keepAliveOnce
Browse files Browse the repository at this point in the history
clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0
  • Loading branch information
fanminshi authored Feb 14, 2017
2 parents 78d153f + 8cb5e05 commit ad1b754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clientv3/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad1b754

Please sign in to comment.