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

View File

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