Commit 5d19daa2 authored by Ke Zhang's avatar Ke Zhang

optimize podKiller for reading channel

parent 4fdde68f
......@@ -2107,11 +2107,13 @@ func (kl *Kubelet) podKiller() {
for {
select {
case podPair, ok := <-kl.podKillingCh:
runningPod := podPair.RunningPod
apiPod := podPair.APIPod
if !ok {
return
}
runningPod := podPair.RunningPod
apiPod := podPair.APIPod
if killing.Has(string(runningPod.ID)) {
// The pod is already being killed.
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment