Skip to content

Commit

Permalink
Merge pull request kubernetes#23210 from rsc/master
Browse files Browse the repository at this point in the history
Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Mar 19, 2016
2 parents ed6088a + e4b369e commit 4be9587
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/storage/cacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,11 @@ func (c *cacheWatcher) stop() {
}

func (c *cacheWatcher) add(event watchCacheEvent) {
t := time.NewTimer(5 * time.Second)
defer t.Stop()
select {
case c.input <- event:
case <-time.After(5 * time.Second):
case <-t.C:
// This means that we couldn't send event to that watcher.
// Since we don't want to blockin on it infinitely,
// we simply terminate it.
Expand Down

0 comments on commit 4be9587

Please sign in to comment.