mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 11:18:02 +08:00
fix gClien Close()
This commit is contained in:
parent
c2e91edca8
commit
c7cf72e7bc
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user