From d871d6e1608f775454da41e2cdc610f29c7ddf77 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Mon, 9 Sep 2019 15:31:00 +0800 Subject: [PATCH] address the comment Signed-off-by: Ryan Leung --- server/api/redirector.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/api/redirector.go b/server/api/redirector.go index 322404ce3196..43df4b18287f 100644 --- a/server/api/redirector.go +++ b/server/api/redirector.go @@ -83,14 +83,13 @@ type customReverseProxies struct { } func newCustomReverseProxies(urls []url.URL, cfg *tls.Config) *customReverseProxies { - if cfg != nil { - dialClient = &http.Client{ - Transport: &http.Transport{ - TLSClientConfig: cfg, - DisableKeepAlives: true, - }, - } + dialClient = &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: cfg, + DisableKeepAlives: true, + }, } + p := &customReverseProxies{ client: dialClient, }