mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +00:00
Fix changes
This commit is contained in:
parent
87e7d77e15
commit
0d0af48444
@ -321,16 +321,12 @@ func (c *AvailableConditionController) sync(key string) error {
|
|||||||
// we had trouble with slow dial and DNS responses causing us to wait too long.
|
// we had trouble with slow dial and DNS responses causing us to wait too long.
|
||||||
// we added this as insurance
|
// we added this as insurance
|
||||||
case <-time.After(6 * time.Second):
|
case <-time.After(6 * time.Second):
|
||||||
defer func() {
|
|
||||||
// errCh needs to have a reader since the above goroutine doing the work
|
// errCh needs to have a reader since the above goroutine doing the work
|
||||||
// needs to send to it. This is defered to ensure it runs
|
// needs to send to it.
|
||||||
// even if the post timeout work itself panics.
|
|
||||||
go func() {
|
go func() {
|
||||||
res := <-errch
|
if res := <-errch; res != nil {
|
||||||
if res != nil {
|
fmt.Errorf("timed out response from %v: %v", discoveryURL, res)
|
||||||
fmt.Error("%v", res)
|
|
||||||
}
|
}
|
||||||
}()
|
|
||||||
}()
|
}()
|
||||||
results <- fmt.Errorf("timed out waiting for %v", discoveryURL)
|
results <- fmt.Errorf("timed out waiting for %v", discoveryURL)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user