From 12f5b05aca8c51524d79ca3d1f6e580395de98d5 Mon Sep 17 00:00:00 2001 From: guangwu Date: Wed, 17 Apr 2024 17:47:47 +0800 Subject: [PATCH] fix: close resp body --- transport/internet/reality/reality.go | 1 + 1 file changed, 1 insertion(+) diff --git a/transport/internet/reality/reality.go b/transport/internet/reality/reality.go index b8bb881f..5548580c 100644 --- a/transport/internet/reality/reality.go +++ b/transport/internet/reality/reality.go @@ -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