From 267d1cb16fc75e4d56f310bf5109d1a782b3576a Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Thu, 2 Jun 2016 23:59:49 -0700 Subject: [PATCH] clientv3: fix watch to reconnect on failure It was spinning before. --- clientv3/watch.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clientv3/watch.go b/clientv3/watch.go index 3c85a2add..f3a8d7bbb 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -521,6 +521,9 @@ func (w *watcher) openWatchClient() (ws pb.Watch_WatchClient, err error) { return nil, v3rpc.Error(err) } w.rc.release() + if nerr := w.rc.reconnectWait(w.ctx, err); nerr != nil { + return nil, v3rpc.Error(nerr) + } } return ws, nil }