clientv3: return CompactRevision wresp when set with Canceled

This commit is contained in:
Anthony Romano 2017-07-19 13:04:19 -07:00
parent 6fb08672d8
commit 318caeee7e

View File

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