diff --git a/helper/resource/state.go b/helper/resource/state.go index 6eda1993f1..089a246fda 100644 --- a/helper/resource/state.go +++ b/helper/resource/state.go @@ -225,12 +225,9 @@ func (conf *StateChangeConf) WaitForStateContext(ctx context.Context) (interface return nil, ctx.Err() case <-timeout: log.Printf("[WARN] WaitForState timeout after %s", conf.Timeout) - log.Printf("[WARN] WaitForState starting %s refresh grace period", refreshGracePeriod) - // cancel the goroutine and start our grace period timer + // cancel the goroutine close(cancelCh) - timeout := time.After(refreshGracePeriod) - // we need a for loop and a label to break on, because we may have // an extra response value to read, but still want to wait for the // channel to close. @@ -254,9 +251,6 @@ func (conf *StateChangeConf) WaitForStateContext(ctx context.Context) (interface case <-ctx.Done(): log.Println("[ERROR] Context cancelation detected, abandoning grace period") break forSelect - case <-timeout: - log.Println("[ERROR] WaitForState exceeded refresh grace period") - break forSelect } }