mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +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
|
unsyncedPod := false
|
||||||
podSyncTypes := make(map[types.UID]metrics.SyncPodType)
|
podSyncTypes := make(map[types.UID]metrics.SyncPodType)
|
||||||
select {
|
select {
|
||||||
case u := <-updates:
|
case u, ok := <-updates:
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
kl.podManager.UpdatePods(u, podSyncTypes)
|
kl.podManager.UpdatePods(u, podSyncTypes)
|
||||||
unsyncedPod = true
|
unsyncedPod = true
|
||||||
case <-time.After(kl.resyncInterval):
|
case <-time.After(kl.resyncInterval):
|
||||||
|
Loading…
Reference in New Issue
Block a user