From 26160b21549400d07638f1f98ebe4d7ed8a1875a Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Tue, 7 Oct 2014 01:53:55 -0700 Subject: [PATCH] store: use a larger buffer for eventChan The event channel for watches can drop events too easily in the case of streaming watches. This increases the buffer to a more useful level. --- store/watcher_hub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/watcher_hub.go b/store/watcher_hub.go index 36612199d..de9003575 100644 --- a/store/watcher_hub.go +++ b/store/watcher_hub.go @@ -47,7 +47,7 @@ func (wh *watcherHub) watch(key string, recursive, stream bool, index, storeInde } w := &watcher{ - eventChan: make(chan *Event, 1), // use a buffered channel + eventChan: make(chan *Event, 100), // use a buffered channel recursive: recursive, stream: stream, sinceIndex: index,