This commit is contained in:
gospider
2024-12-23 21:35:47 +08:00
parent 3c2ae36494
commit a8b19ecde0
2 changed files with 4 additions and 1 deletions

View File

@@ -302,6 +302,9 @@ func (obj *Response) ReadBody() (err error) {
} else {
_, err = io.Copy(bBody, obj.Body())
}
if err == io.ErrUnexpectedEOF {
err = nil
}
close(done)
}()
select {

View File

@@ -260,7 +260,7 @@ func (obj *roundTripper) poolRoundTrip(option *RequestOption, pool *connPool, ta
if task.err == nil && task.res == nil {
task.err = context.Cause(task.ctx)
}
return true, nil
return true, task.err
}
default:
return obj.createPool(option, task, key)