diff --git a/server/sandbox_run.go b/server/sandbox_run.go index 5b50670e..cdc17446 100644 --- a/server/sandbox_run.go +++ b/server/sandbox_run.go @@ -109,6 +109,9 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest return nil, err } dupID := matches[1] + if _, err := s.StopPodSandbox(ctx, &pb.StopPodSandboxRequest{PodSandboxId: dupID}); err != nil { + return nil, err + } if _, err := s.RemovePodSandbox(ctx, &pb.RemovePodSandboxRequest{PodSandboxId: dupID}); err != nil { return nil, err }