Skip to content

Commit

Permalink
fix nil pointer when pass ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Jun 20, 2019
1 parent ac2d62c commit b713f87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions req.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ func (r *Req) Do(method, rawurl string, vs ...interface{}) (resp *Resp, err erro
progress = vv
case context.Context:
req = req.WithContext(vv)
resp.req = req
case error:
return nil, vv
}
Expand Down

0 comments on commit b713f87

Please sign in to comment.