Skip to content

Commit

Permalink
Stop SIGSEGV on test dial not reachable
Browse files Browse the repository at this point in the history
Signed-off-by: John Howard <[email protected]>
  • Loading branch information
John Howard committed Jul 23, 2015
1 parent f218192 commit 09b86c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions integration-cli/docker_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,9 @@ func sockRequest(method, endpoint string, data interface{}) (int, []byte, error)

res, body, err := sockRequestRaw(method, endpoint, jsonData, "application/json")
if err != nil {
b, _ := ioutil.ReadAll(body)
return -1, b, err
return -1, nil, err
}
var b []byte
b, err = readBody(body)
b, err := readBody(body)
return res.StatusCode, b, err
}

Expand Down

0 comments on commit 09b86c4

Please sign in to comment.