Don't share http roundtripper between clients
This seems to fix the issues with concurrency.
This commit is contained in:
parent
c6361ea488
commit
f5a91f918e
@ -54,7 +54,9 @@ func (o *ClientOpts) withDefaults() *ClientOpts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if o.HTTPClient == nil {
|
if o.HTTPClient == nil {
|
||||||
o.HTTPClient = new(http.Client)
|
o.HTTPClient = &http.Client{
|
||||||
|
Transport: http.DefaultTransport.(*http.Transport).Clone(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if o.MaxRedirects == 0 {
|
if o.MaxRedirects == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user