瀏覽代碼

feat(stream watchers) fix locking issue

Cenk Alti 12 年之前
父節點
當前提交
8597904bc2
共有 1 個文件被更改,包括 0 次插入10 次删除
  1. 0 10
      store/watcher_hub.go

+ 0 - 10
store/watcher_hub.go

@@ -87,16 +87,6 @@ func (wh *watcherHub) watch(key string, recursive, stream bool, index uint64) (*
 		if l.Len() == 0 {
 			delete(wh.watchers, key)
 		}
-
-		// consume all items in the channel
-		// unblock all the waiting go routines created by watchHub
-		for {
-			select {
-			case <-w.EventChan:
-			default:
-				break
-			}
-		}
 	}
 
 	atomic.AddInt64(&wh.count, 1)