fix: close and drain the response body always (#8847)

This commit is contained in:
Harshavardhana authored and GitHub committed 2020-01-21 02:46:58 -08:00
1 parent 3011692d93
commit e2b3c083aa
9 files changed
+17 -4

No files matched your search

+1
View File
@@ -2029,6 +2029,7 @@ func (web *webAPIHandlers) LoginSTS(r *http.Request, args *LoginSTSArgs, reply *
resp, err := clnt.Do(req)
if err != nil {
clnt.CloseIdleConnections()
return toJSONError(ctx, err)
}
defer xhttp.DrainBody(resp.Body)