chore: fix a couple of unclosed http connections (#10806)

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-07-20 20:22:40 +00:00
committed by GitHub
parent 578cc5a165
commit d710874903
2 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -607,6 +607,7 @@ func soapRequestWithIP(ctx context.Context, url, service, function, message stri
l.Debugln("SOAP do:", err)
return resp, err
}
defer r.Body.Close()
resp, err = io.ReadAll(r.Body)
if err != nil {
@@ -616,8 +617,6 @@ func soapRequestWithIP(ctx context.Context, url, service, function, message stri
l.Debugf("SOAP Response: %s\n\n%s\n\n", r.Status, resp)
r.Body.Close()
if r.StatusCode >= 400 {
return resp, errors.New(function + ": " + r.Status)
}