Don't share http roundtripper between clients

This seems to fix the issues with concurrency.
This commit is contained in:
Brian Picciano 2024-01-04 20:31:17 +01:00
parent c6361ea488
commit f5a91f918e

View File

@ -54,7 +54,9 @@ func (o *ClientOpts) withDefaults() *ClientOpts {
}
if o.HTTPClient == nil {
o.HTTPClient = new(http.Client)
o.HTTPClient = &http.Client{
Transport: http.DefaultTransport.(*http.Transport).Clone(),
}
}
if o.MaxRedirects == 0 {