Skip to content

Commit 6649058

Browse files
committed
remove cloneTLSConfig, and use (*tls.Config).Clone directly instead.
1 parent 1fa015b commit 6649058

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

utils.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func DeregisterTLSConfig(key string) {
8282
func getTLSConfigClone(key string) (config *tls.Config) {
8383
tlsConfigLock.RLock()
8484
if v, ok := tlsConfigRegistry[key]; ok {
85-
config = cloneTLSConfig(v)
85+
config = v.Clone()
8686
}
8787
tlsConfigLock.RUnlock()
8888
return
@@ -727,10 +727,6 @@ func (ae *atomicError) Value() error {
727727
return nil
728728
}
729729

730-
func cloneTLSConfig(c *tls.Config) *tls.Config {
731-
return c.Clone()
732-
}
733-
734730
func namedValueToValue(named []driver.NamedValue) ([]driver.Value, error) {
735731
dargs := make([]driver.Value, len(named))
736732
for n, param := range named {

0 commit comments

Comments
 (0)