diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index 9a7f2d721efd..d92433b67332 100644 --- a/clientv3/integration/watch_test.go +++ b/clientv3/integration/watch_test.go @@ -516,9 +516,6 @@ func TestWatchCompactRevision(t *testing.T) { if wresp.Err() != rpctypes.ErrCompacted { t.Fatalf("wresp.Err() expected %v, but got %v", rpctypes.ErrCompacted, wresp.Err()) } - if !wresp.Canceled { - t.Fatalf("wresp.Canceled expected true, got %+v", wresp) - } // ensure the channel is closed if wresp, ok = <-wch; ok { diff --git a/clientv3/watch.go b/clientv3/watch.go index eb7d234baee0..12977aed8966 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -463,7 +463,7 @@ func (w *watchGrpcStream) run() { if ws := w.nextResume(); ws != nil { wc.Send(ws.initReq.toPB()) } - case pbresp.Canceled && pbresp.CompactRevision == 0: + case pbresp.Canceled: delete(cancelSet, pbresp.WatchId) if ws, ok := w.substreams[pbresp.WatchId]; ok { // signal to stream goroutine to update closingc