File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
staging/src/k8s.io/kube-aggregator/pkg/controllers/status Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -321,17 +321,13 @@ func (c *AvailableConditionController) sync(key string) error {
321
321
// we had trouble with slow dial and DNS responses causing us to wait too long.
322
322
// we added this as insurance
323
323
case <- time .After (6 * time .Second ):
324
- defer func () {
325
- // errCh needs to have a reader since the above goroutine doing the work
326
- // needs to send to it. This is defered to ensure it runs
327
- // even if the post timeout work itself panics.
328
- go func () {
329
- res := <- errch
330
- if res != nil {
331
- fmt .Error ("%v" , res )
332
- }
333
- }()
334
- }()
324
+ // errCh needs to have a reader since the above goroutine doing the work
325
+ // needs to send to it.
326
+ go func () {
327
+ if res := <- errch ; res != nil {
328
+ fmt .Errorf ("timed out response from %v: %v" , discoveryURL , res )
329
+ }
330
+ }()
335
331
results <- fmt .Errorf ("timed out waiting for %v" , discoveryURL )
336
332
return
337
333
}
You can’t perform that action at this time.
0 commit comments