tls.DialWithDialer copies the passed in tls.Config if Config.ServerName is not set, but does not exclude copying the unexported sync.Once: tls.go:138.
DialWithDialer should use something like cloneTLSClientConfig from net/http. Related to #15771, which proposes implementing a Clone method on Config, which would help here.
CC @GeoffreyPlouviez who found the bug originally.
tls.DialWithDialer copies the passed in tls.Config if Config.ServerName is not set, but does not exclude copying the unexported sync.Once: tls.go:138.
DialWithDialer should use something like cloneTLSClientConfig from net/http. Related to #15771, which proposes implementing a Clone method on Config, which would help here.
CC @GeoffreyPlouviez who found the bug originally.