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()
|
result = r.renewLease()
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
r.doneCh <- result
|
||||||
case r.doneCh <- result:
|
|
||||||
case <-r.stopCh:
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// renewAuth is a helper for renewing authentication.
|
// renewAuth is a helper for renewing authentication.
|
||||||
|
|
Loading…
Reference in New Issue