Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Add timeout for version exec
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hiltgen committed Sep 13, 2021
1 parent 2c7c172 commit 11ec9d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/driver/kubernetes/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@ func (d *Driver) GetVersion(ctx context.Context) (string, error) {
Stderr: true,
TTY: false,
}, scheme.ParameterCodec)
req.Timeout(10 * time.Second)
u := req.URL()
exec, err := remotecommand.NewSPDYExecutor(restClientConfig, "POST", u)
if err != nil {
return "", err
}
// TODO how to timeout if something goes bad...?
serr := exec.Stream(remotecommand.StreamOptions{
Stdout: buf,
Stderr: os.Stderr,
Expand Down

0 comments on commit 11ec9d4

Please sign in to comment.