Don't share http roundtripper between clients

This seems to fix the issues with concurrency.
main
Brian Picciano 5 months ago
parent c6361ea488
commit f5a91f918e
  1. 4
      client.go

@ -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 {

Loading…
Cancel
Save