Browse Source

v3rpc: don't elide next progress notification on progress notification

Fixes #5878
Anthony Romano 9 years ago
parent
commit
299ebc6137
1 changed files with 2 additions and 1 deletions
  1. 2 1
      etcdserver/api/v3rpc/watch.go

+ 2 - 1
etcdserver/api/v3rpc/watch.go

@@ -295,7 +295,8 @@ func (sws *serverWatchStream) sendLoop() {
 			}
 
 			sws.mu.Lock()
-			if _, ok := sws.progress[wresp.WatchID]; ok {
+			if len(evs) > 0 && sws.progress[wresp.WatchID] {
+				// elide next progress update if sent a key update
 				sws.progress[wresp.WatchID] = false
 			}
 			sws.mu.Unlock()