diff --git a/config/env/watcher.go b/config/env/watcher.go index edcaf3e93..2ea02931e 100644 --- a/config/env/watcher.go +++ b/config/env/watcher.go @@ -20,10 +20,8 @@ func NewWatcher() (config.Watcher, error) { // Next will be blocked until the Stop method is called func (w *watcher) Next() ([]*config.KeyValue, error) { - select { - case <-w.ctx.Done(): - return nil, w.ctx.Err() - } + <-w.ctx.Done() + return nil, w.ctx.Err() } func (w *watcher) Stop() error {