fix: DetectAcid 时可能的连接溢出
This commit is contained in:
@@ -88,6 +88,7 @@ func (a *Api) DetectAcid() (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
_, _ = io.Copy(io.Discard, res.Body)
|
||||||
_ = res.Body.Close()
|
_ = res.Body.Close()
|
||||||
loc := res.Header.Get("location")
|
loc := res.Header.Get("location")
|
||||||
if res.StatusCode == 302 && loc != "" {
|
if res.StatusCode == 302 && loc != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user