mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
If err does not add continue, type conversion will be error.
If do not add continue, pod. (* V1.Pod) may cause panic to run.
This commit is contained in:
parent
5ca33f51ac
commit
96c0fe9b11
@ -505,6 +505,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))
|
||||
}
|
||||
@ -519,6 +520,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
Block a user