watcher send changes only on non nil

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-08-04 12:26:19 +03:00
parent 7828935a5b
commit 0501ba2bac

View File

@ -247,11 +247,12 @@ func (w *consulWatcher) run() {
delete(dstmp, sk)
}
}
if len(dstmp) > 0 {
w.vchan <- dstmp
src = dst
}
}
}
}
func (w *consulWatcher) Next() (map[string]interface{}, error) {