mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-05 06:33:02 +00:00
fix: close resp body
This commit is contained in:
parent
befa7b8138
commit
12f5b05aca
@ -222,6 +222,7 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
|||||||
if resp, err = client.Do(req); err != nil {
|
if resp, err = client.Do(req); err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
req.Header.Set("Referer", req.URL.String())
|
req.Header.Set("Referer", req.URL.String())
|
||||||
if body, err = io.ReadAll(resp.Body); err != nil {
|
if body, err = io.ReadAll(resp.Body); err != nil {
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user