Преглед на файлове

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

Fixes #6549
Anthony Romano преди 10 години
родител
ревизия
bf2581390d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      clientv3/watch.go

+ 1 - 1
clientv3/watch.go

@@ -92,7 +92,7 @@ func (wr *WatchResponse) Err() error {
 
 
 // IsProgressNotify returns true if the WatchResponse is progress notification.
 // IsProgressNotify returns true if the WatchResponse is progress notification.
 func (wr *WatchResponse) IsProgressNotify() bool {
 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
 // watcher implements the Watcher interface