mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
sync
This commit is contained in:
@@ -306,10 +306,6 @@ func (obj *roundTripper) RoundTrip(ctx *Response) (err error) {
|
||||
select {
|
||||
case <-ctx.Context().Done():
|
||||
return context.Cause(ctx.Context())
|
||||
default:
|
||||
}
|
||||
ctx.response = nil
|
||||
select {
|
||||
case conn = <-obj.getConnPool(ctx.connKey):
|
||||
ctx.isNewConn = false
|
||||
default:
|
||||
@@ -317,8 +313,7 @@ func (obj *roundTripper) RoundTrip(ctx *Response) (err error) {
|
||||
conn, err = obj.newConn(ctx)
|
||||
}
|
||||
if err == nil {
|
||||
err = ctx.doRequest(conn)
|
||||
if err == nil {
|
||||
if err = ctx.doRequest(conn); err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user