This commit is contained in:
wjqserver 2025-05-14 17:55:37 +08:00
parent 47c03763a7
commit ce814875e1
6 changed files with 46 additions and 8 deletions

View file

@ -38,6 +38,16 @@ func GhcrRequest(ctx context.Context, c *app.RequestContext, u string, cfg *conf
err error
)
go func() {
<-ctx.Done()
if resp != nil && resp.Body != nil {
resp.Body.Close()
}
if req != nil {
req.Body.Close()
}
}()
method = c.Request.Method()
rb := client.NewRequestBuilder(string(method), u)