fix gClien Close()

This commit is contained in:
huangqian 2022-05-12 23:22:30 +08:00
parent c2e91edca8
commit c7cf72e7bc

View File

@ -71,10 +71,8 @@ func (r *Response) ReadAllString() string {
// Close closes the response when it will never be used.
func (r *Response) Close() error {
if r == nil || r.Response == nil || r.Response.Close {
if r == nil || r.Response == nil {
return nil
}
r.Response.Close = true
r.ReadAll()
return r.Response.Body.Close()
}