Skip to content

Commit

Permalink
add timeout for restapi
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizhiqing committed May 10, 2022
1 parent 3d08c40 commit 73e09a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/paddlejob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ func (r *PaddleJobReconciler) execInPod(namespace string, podName string, contai
Command: cmd,
Stdout: true,
Stderr: true,
}, runtime.NewParameterCodec(r.Scheme))
}, runtime.NewParameterCodec(r.Scheme)).Timeout(3 * time.Second)

exec, err := remotecommand.NewSPDYExecutor(r.RESTConfig, http.MethodPost, execReq.URL())
if err != nil {
Expand Down

0 comments on commit 73e09a4

Please sign in to comment.