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() { ...@@ -2107,11 +2107,13 @@ func (kl *Kubelet) podKiller() {
for { for {
select { select {
case podPair, ok := <-kl.podKillingCh: case podPair, ok := <-kl.podKillingCh:
runningPod := podPair.RunningPod
apiPod := podPair.APIPod
if !ok { if !ok {
return return
} }
runningPod := podPair.RunningPod
apiPod := podPair.APIPod
if killing.Has(string(runningPod.ID)) { if killing.Has(string(runningPod.ID)) {
// The pod is already being killed. // The pod is already being killed.
break 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