fix: DetectAcid 时可能的连接溢出

This commit is contained in:
Mmx233
2023-12-01 13:29:51 +08:00
parent 75f72750de
commit 53bc2c2785

View File

@@ -88,6 +88,7 @@ func (a *Api) DetectAcid() (string, error) {
if err != nil {
return "", err
}
_, _ = io.Copy(io.Discard, res.Body)
_ = res.Body.Close()
loc := res.Header.Get("location")
if res.StatusCode == 302 && loc != "" {