Fix #4472 a better way
Unlike switch, select will randomly choose from among multiple cases if more than one are satisfiable.
This commit is contained in:
parent
e2bb955673
commit
58bc941b71
|
@ -166,10 +166,7 @@ func (r *Renewer) Renew() {
|
|||
result = r.renewLease()
|
||||
}
|
||||
|
||||
select {
|
||||
case r.doneCh <- result:
|
||||
case <-r.stopCh:
|
||||
}
|
||||
r.doneCh <- result
|
||||
}
|
||||
|
||||
// renewAuth is a helper for renewing authentication.
|
||||
|
|
Loading…
Reference in New Issue