lib/proxy: there is no need in cloning tlsCfg, which has been created two lines above

This commit is contained in:
Aliaksandr Valialkin 2021-03-12 10:46:45 +02:00
parent 72a8fa484b
commit 54f902467d

View file

@ -97,7 +97,6 @@ func (u *URL) NewDialFunc(ac *promauth.Config) (fasthttp.DialFunc, error) {
if isTLS {
tlsCfg = ac.NewTLSConfig()
if !tlsCfg.InsecureSkipVerify && tlsCfg.ServerName == "" {
tlsCfg = tlsCfg.Clone()
tlsCfg.ServerName = tlsServerName(proxyAddr)
}
}