Skip to content

Commit

Permalink
v3rpc: set canceled=true when stream is compacted
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano authored and visheshnp committed Aug 3, 2017
1 parent 4fc16db commit c1dbb08
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 c1dbb08

Please sign in to comment.