mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Stop SIGSEGV on test dial not reachable
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
f218192754
commit
09b86c46b8
1 changed files with 2 additions and 4 deletions
|
@ -338,11 +338,9 @@ func sockRequest(method, endpoint string, data interface{}) (int, []byte, error)
|
||||||
|
|
||||||
res, body, err := sockRequestRaw(method, endpoint, jsonData, "application/json")
|
res, body, err := sockRequestRaw(method, endpoint, jsonData, "application/json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b, _ := ioutil.ReadAll(body)
|
return -1, nil, err
|
||||||
return -1, b, err
|
|
||||||
}
|
}
|
||||||
var b []byte
|
b, err := readBody(body)
|
||||||
b, err = readBody(body)
|
|
||||||
return res.StatusCode, b, err
|
return res.StatusCode, b, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue