check for etcd watcher canceled value

This commit is contained in:
Asim Aslam 2020-02-13 22:34:56 +00:00
parent d9b3b17582
commit 203486fd31

View File

@ -48,6 +48,9 @@ func (ew *etcdWatcher) Next() (*registry.Result, error) {
if wresp.Err() != nil {
return nil, wresp.Err()
}
if wresp.Canceled {
return nil, errors.New("could not get next")
}
for _, ev := range wresp.Events {
service := decode(ev.Kv.Value)
var action string