mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
commit
4be9587b43
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user