From 890cab021cbb610c44185161ba806d8377c96bd2 Mon Sep 17 00:00:00 2001 From: dawkaka Date: Fri, 21 Jun 2024 20:03:46 +0000 Subject: [PATCH] fix duplicate outgoing request logging --- outgoing.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(