Commit 4be9587b authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #23210 from rsc/master

Auto commit by PR queue bot
parents ed6088a8 e4b369e1
...@@ -502,9 +502,11 @@ func (c *cacheWatcher) stop() { ...@@ -502,9 +502,11 @@ func (c *cacheWatcher) stop() {
} }
func (c *cacheWatcher) add(event watchCacheEvent) { func (c *cacheWatcher) add(event watchCacheEvent) {
t := time.NewTimer(5 * time.Second)
defer t.Stop()
select { select {
case c.input <- event: case c.input <- event:
case <-time.After(5 * time.Second): case <-t.C:
// This means that we couldn't send event to that watcher. // This means that we couldn't send event to that watcher.
// Since we don't want to blockin on it infinitely, // Since we don't want to blockin on it infinitely,
// we simply terminate it. // we simply terminate it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment