Skip to content

Commit

Permalink
v3rpc: set canceled=true when stream is compacted
Browse files Browse the repository at this point in the history
Fixes #8231
  • Loading branch information
heyitsanthony committed Jul 19, 2017
1 parent c6277bd commit 4506ba7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions etcdserver/api/v3rpc/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,13 @@ func (sws *serverWatchStream) sendLoop() {
}
}

canceled := wresp.CompactRevision != 0
wr := &pb.WatchResponse{
Header: sws.newResponseHeader(wresp.Revision),
WatchId: int64(wresp.WatchID),
Events: events,
CompactRevision: wresp.CompactRevision,
Canceled: canceled,
}

if _, hasId := ids[wresp.WatchID]; !hasId {
Expand Down

0 comments on commit 4506ba7

Please sign in to comment.