mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Merge pull request #6595 from guenter/kubelet-update-channel-closed
kubelet syncloop should stop if/when updates chan closes
This commit is contained in:
commit
13b29cd64b
@ -1607,7 +1607,11 @@ 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 {
|
||||
glog.Errorf("Update channel is closed. Exiting the sync loop.")
|
||||
return
|
||||
}
|
||||
kl.podManager.UpdatePods(u, podSyncTypes)
|
||||
unsyncedPod = true
|
||||
case <-time.After(kl.resyncInterval):
|
||||
|
Loading…
Reference in New Issue
Block a user