mirror of
https://github.com/moby/moby.git
synced 2026-08-03 22:51:03 +00:00
Merge pull request #33358 from vdemeester/fix-integration-request-package
Fix `request.SockRequestRaw` error check
This commit is contained in:
@@ -217,13 +217,14 @@ func SockRequestRaw(method, endpoint string, data io.Reader, ct, daemon string,
|
||||
}
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
client.Close()
|
||||
return resp, nil, err
|
||||
}
|
||||
body := ioutils.NewReadCloserWrapper(resp.Body, func() error {
|
||||
defer resp.Body.Close()
|
||||
return client.Close()
|
||||
})
|
||||
if err != nil {
|
||||
client.Close()
|
||||
}
|
||||
|
||||
return resp, body, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user