Browse Source

clientv3: return CompactRevision wresp when set with Canceled

Anthony Romano 8 years ago
parent
commit
318caeee7e
1 changed files with 1 additions and 1 deletions
  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 {
 				if ws := w.nextResume(); ws != nil {
 					wc.Send(ws.initReq.toPB())
 					wc.Send(ws.initReq.toPB())
 				}
 				}
-			case pbresp.Canceled:
+			case pbresp.Canceled && pbresp.CompactRevision == 0:
 				delete(cancelSet, pbresp.WatchId)
 				delete(cancelSet, pbresp.WatchId)
 				if ws, ok := w.substreams[pbresp.WatchId]; ok {
 				if ws, ok := w.substreams[pbresp.WatchId]; ok {
 					// signal to stream goroutine to update closingc
 					// signal to stream goroutine to update closingc