Explorar o código

clientv3: return CompactRevision wresp when set with Canceled

Anthony Romano %!s(int64=8) %!d(string=hai) anos
pai
achega
318caeee7e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      clientv3/watch.go

+ 1 - 1
clientv3/watch.go

@@ -461,7 +461,7 @@ func (w *watchGrpcStream) run() {
 				if ws := w.nextResume(); ws != nil {
 					wc.Send(ws.initReq.toPB())
 				}
-			case pbresp.Canceled:
+			case pbresp.Canceled && pbresp.CompactRevision == 0:
 				delete(cancelSet, pbresp.WatchId)
 				if ws, ok := w.substreams[pbresp.WatchId]; ok {
 					// signal to stream goroutine to update closingc