mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 14:23:37 +00:00
kubelet syncloop should stop if/when updates chan closes
This commit is contained in:
parent
c4cbc9bc46
commit
3efff6d4e8
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user