diff --git a/outgoing.go b/outgoing.go index 044f4d0..2bc963f 100644 --- a/outgoing.go +++ b/outgoing.go @@ -103,10 +103,12 @@ func HTTPClient(ctx context.Context, opts ...RoundTripperOption) *http.Client { opt(cfg) } - httpClient := http.DefaultClient + httpClientV := *http.DefaultClient + httpClient := &httpClientV if cfg.HTTPClient != nil { // Use httpClient supplied by user. - httpClient = cfg.HTTPClient + v := *cfg.HTTPClient + httpClient = &v } httpClient.Transport = client.WrapRoundTripper(