From 556c1dd9b2b313676fad356efd4a73efa11d7d1f Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 13 Jul 2022 16:38:10 -0400 Subject: [PATCH] test default http client --- internal/reddit/client.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/internal/reddit/client.go b/internal/reddit/client.go index 5ebfba4..917b174 100644 --- a/internal/reddit/client.go +++ b/internal/reddit/client.go @@ -88,14 +88,17 @@ func NewClient(id, secret string, statsd statsd.ClientInterface, redis *redis.Cl }, } - t := http.DefaultTransport.(*http.Transport).Clone() - t.MaxIdleConns = connLimit / 4 / 100 - t.MaxConnsPerHost = connLimit / 100 - t.MaxIdleConnsPerHost = connLimit / 4 / 100 - t.IdleConnTimeout = 60 * time.Second - t.ResponseHeaderTimeout = 5 * time.Second + /* + t := http.DefaultTransport.(*http.Transport).Clone() + t.MaxIdleConns = connLimit / 4 / 100 + t.MaxConnsPerHost = connLimit / 100 + t.MaxIdleConnsPerHost = connLimit / 4 / 100 + t.IdleConnTimeout = 60 * time.Second + t.ResponseHeaderTimeout = 5 * time.Second - client := &http.Client{Transport: t} + client := &http.Client{Transport: t} + */ + client := &http.Client{} pool := &fastjson.ParserPool{}