clientv3: fix watch to reconnect on failure

It was spinning before.
This commit is contained in:
Anthony Romano 2016-06-02 23:59:49 -07:00
parent 5f5a203e27
commit 267d1cb16f

View File

@ -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
}