mirror of https://github.com/k3s-io/k3s
Merge pull request #47828 from yiqinguo/yiqinguo_add_continue
Automatic merge from submit-queue If error continue for loop If err does not add continue, type conversion will be error. If do not add continue, pod. (* V1.Pod) may cause panic to run. **Release note**: ```release-note NONE ```pull/6/head
commit
5bb42cbc58
|
@ -506,6 +506,7 @@ func (s *podStorage) MergedState() interface{} {
|
|||
pod, err := api.Scheme.Copy(podRef)
|
||||
if err != nil {
|
||||
glog.Errorf("unable to copy pod: %v", err)
|
||||
continue
|
||||
}
|
||||
pods = append(pods, pod.(*v1.Pod))
|
||||
}
|
||||
|
@ -520,6 +521,7 @@ func copyPods(sourcePods []*v1.Pod) []*v1.Pod {
|
|||
pod, err := api.Scheme.Copy(source)
|
||||
if err != nil {
|
||||
glog.Errorf("unable to copy pod: %v", err)
|
||||
continue
|
||||
}
|
||||
pods = append(pods, pod.(*v1.Pod))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue