Skip to content

Commit

Permalink
Merge pull request #4303 from hashicorp/b-docker-client-nil-panic
Browse files Browse the repository at this point in the history
Add nil check before setting timeout on docker client
  • Loading branch information
preetapan committed May 22, 2018
2 parents a0cce52 + ead6d88 commit 0fcfaab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ func (d *DockerDriver) newDockerClient(timeout time.Duration) (*docker.Client, e
}
}

if timeout != 0 {
if timeout != 0 && newClient != nil {
newClient.SetTimeout(timeout)
}
return newClient, merr.ErrorOrNil()
Expand Down

0 comments on commit 0fcfaab

Please sign in to comment.