chore(syncthing): ensure response body is closed in upgrade request (#10169)

This commit is contained in:
ardevd
2025-06-09 22:10:17 +02:00
committed by GitHub
parent 8afc9855f2
commit b1a1a90045

View File

@@ -403,9 +403,11 @@ func upgradeViaRest() error {
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
bs, err := io.ReadAll(resp.Body)
defer resp.Body.Close()
if err != nil {
return err
}