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,9 +247,10 @@ func (w *consulWatcher) run() {
delete(dstmp, sk)
}
}
w.vchan <- dstmp
src = dst
if len(dstmp) > 0 {
w.vchan <- dstmp
src = dst
}
}
}
}