mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
avoid network read errors crashing CreateFile call (#11939)
Thanks to @dvaldivia for reproducing this
This commit is contained in:
parent
f60eaabfcd
commit
3c571472e0
@ -340,9 +340,8 @@ func (client *storageRESTClient) CreateFile(ctx context.Context, volume, path st
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
waitReader, err := waitForHTTPResponse(respBody)
|
||||
defer http.DrainBody(ioutil.NopCloser(waitReader))
|
||||
defer respBody.Close()
|
||||
_, err = waitForHTTPResponse(respBody)
|
||||
defer http.DrainBody(respBody)
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user