clientv3: make IsProgressNotify() false on compact event and closed channel

Fixes #6549
This commit is contained in:
Anthony Romano
2016-09-28 16:47:33 -07:00
parent 150576fa72
commit bf2581390d

View File

@@ -92,7 +92,7 @@ func (wr *WatchResponse) Err() error {
// IsProgressNotify returns true if the WatchResponse is progress notification.
func (wr *WatchResponse) IsProgressNotify() bool {
return len(wr.Events) == 0 && !wr.Canceled && !wr.Created
return len(wr.Events) == 0 && !wr.Canceled && !wr.Created && wr.CompactRevision == 0 && wr.Header.Revision != 0
}
// watcher implements the Watcher interface