Skip to content

Commit

Permalink
Merge 7760735 into 55de68d
Browse files Browse the repository at this point in the history
  • Loading branch information
veshij authored Oct 21, 2024
2 parents 55de68d + 7760735 commit 1168125
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/etcdserver/api/v3rpc/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,17 @@ func (sws *serverWatchStream) recvLoop() error {
id := uv.CancelRequest.WatchId
err := sws.watchStream.Cancel(mvcc.WatchID(id))
if err == nil {
sws.ctrlStream <- &pb.WatchResponse{
wr := &pb.WatchResponse{
Header: sws.newResponseHeader(sws.watchStream.Rev()),
WatchId: id,
Canceled: true,
}
select {
case sws.ctrlStream <- wr:
case <-sws.closec:
return nil
}

sws.mu.Lock()
delete(sws.progress, mvcc.WatchID(id))
delete(sws.prevKV, mvcc.WatchID(id))
Expand Down

0 comments on commit 1168125

Please sign in to comment.