Skip to content

Commit a9325a2

Browse files
authored
sett ServerName on tls.Config even when InsecureSkipVeriy is true (#860)
This behavior also matches the old dialer behavior.
1 parent 34e8f71 commit a9325a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ func (g *connGroup) connect(ctx context.Context, addr net.Addr) (*conn, error) {
11701170
}()
11711171

11721172
if tlsConfig := g.pool.tls; tlsConfig != nil {
1173-
if tlsConfig.ServerName == "" && !tlsConfig.InsecureSkipVerify {
1173+
if tlsConfig.ServerName == "" {
11741174
host, _ := splitHostPort(netAddr.String())
11751175
tlsConfig = tlsConfig.Clone()
11761176
tlsConfig.ServerName = host

0 commit comments

Comments
 (0)