Explorar el Código

clientv3: only resume watcher if error is non-halting

Anthony Romano hace 9 años
padre
commit
7b2f769643
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      clientv3/watch.go

+ 1 - 1
clientv3/watch.go

@@ -477,7 +477,7 @@ func (w *watchGrpcStream) run() {
 		// watch client failed to recv; spawn another if possible
 		// TODO report watch client errors from errc?
 		case err := <-w.errc:
-			if toErr(w.ctx, err) == v3rpc.ErrNoLeader {
+			if isHaltErr(w.ctx, err) || toErr(w.ctx, err) == v3rpc.ErrNoLeader {
 				closeErr = err
 				return
 			}