fix: close resp body

This commit is contained in:
guangwu 2024-04-17 17:47:47 +08:00 committed by yuhan6665
parent befa7b8138
commit 12f5b05aca
1 changed files with 1 additions and 0 deletions

View File

@ -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 {
break
}
defer resp.Body.Close()
req.Header.Set("Referer", req.URL.String())
if body, err = io.ReadAll(resp.Body); err != nil {
break