mirror of https://github.com/docker/docs.git
Merge pull request #14880 from Microsoft/10662-paniconremotetest
Stop SIGSEGV on test dial not reachable
This commit is contained in:
commit
d593130fda
|
@ -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…
Reference in New Issue