Skip to content

Commit

Permalink
Merge pull request #940 from saschagrunert/timeout-execsync
Browse files Browse the repository at this point in the history
Fix timeout for exec sync
  • Loading branch information
k8s-ci-robot committed May 26, 2022
2 parents 1af0520 + d7fb1f5 commit d9642f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/crictl/exec.go
Expand Up @@ -110,7 +110,8 @@ func ExecSync(client internalapi.RuntimeService, opts execOptions) (int, error)
Timeout: opts.timeout,
}
logrus.Debugf("ExecSyncRequest: %v", request)
stdout, stderr, err := client.ExecSync(opts.id, opts.cmd, time.Duration(opts.timeout))
timeoutDuration := time.Duration(opts.timeout) * time.Second
stdout, stderr, err := client.ExecSync(opts.id, opts.cmd, timeoutDuration)
if err != nil {
return 1, err
}
Expand Down

0 comments on commit d9642f1

Please sign in to comment.