kubelet syncloop should stop if/when updates chan closes

This commit is contained in:
Tobi Knaup 2015-04-08 14:45:16 -07:00
parent c4cbc9bc46
commit 3efff6d4e8

View File

@ -1632,7 +1632,10 @@ func (kl *Kubelet) syncLoop(updates <-chan PodUpdate, handler SyncHandler) {
unsyncedPod := false
podSyncTypes := make(map[types.UID]metrics.SyncPodType)
select {
case u := <-updates:
case u, ok := <-updates:
if !ok {
return
}
kl.podManager.UpdatePods(u, podSyncTypes)
unsyncedPod = true
case <-time.After(kl.resyncInterval):