config/default: return error on Next() call

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-08-04 01:15:50 +03:00
parent f47fbb1030
commit b4f332bf0d
1 changed files with 2 additions and 0 deletions

View File

@ -348,6 +348,8 @@ func (w *defaultWatcher) Next() (map[string]interface{}, error) {
select {
case <-w.done:
break
case err := <-w.echan:
return nil, err
case v, ok := <-w.vchan:
if !ok {
break