Skip to content

Commit d9642f1

Browse files
authored
Merge pull request #940 from saschagrunert/timeout-execsync
Fix timeout for exec sync
2 parents 1af0520 + d7fb1f5 commit d9642f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/crictl/exec.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ func ExecSync(client internalapi.RuntimeService, opts execOptions) (int, error)
110110
Timeout: opts.timeout,
111111
}
112112
logrus.Debugf("ExecSyncRequest: %v", request)
113-
stdout, stderr, err := client.ExecSync(opts.id, opts.cmd, time.Duration(opts.timeout))
113+
timeoutDuration := time.Duration(opts.timeout) * time.Second
114+
stdout, stderr, err := client.ExecSync(opts.id, opts.cmd, timeoutDuration)
114115
if err != nil {
115116
return 1, err
116117
}

0 commit comments

Comments
 (0)