This commit is contained in:
gospider
2025-03-27 17:41:39 +08:00
parent 2e524cb97e
commit 9da7a11bee
3 changed files with 26 additions and 25 deletions

View File

@@ -219,7 +219,7 @@ func (obj *Client) request(ctx *Response) (err error) {
}
}
}
if ctx.Request().Body != nil {
if ctx.Request() != nil && ctx.Request().Body != nil {
ctx.Request().Body.Close()
}
}()