diff --git a/client/v3/lease.go b/client/v3/lease.go index 85703b1a0e3..bd067c63032 100644 --- a/client/v3/lease.go +++ b/client/v3/lease.go @@ -549,9 +549,12 @@ func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) { // deadlineLoop reaps any keep alive channels that have not received a response // within the lease TTL func (l *lessor) deadlineLoop() { + timer := time.NewTimer(time.Second) + defer timer.Stop() for { + timer.Reset(time.Second) select { - case <-time.After(time.Second): + case <-timer.C: case <-l.donec: return }