Skip to content

Commit a762ca1

Browse files
taran-pCopilot
andauthored
Update ldap/ldap.go
Co-authored-by: Copilot <[email protected]>
1 parent adf6f3f commit a762ca1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ldap/ldap.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ func (l *Config) Clone() (cloned Config) {
9191
}
9292

9393
func (l *Config) connect(ldapAddr string) (ldapConn *ldap.Conn, err error) {
94-
tls := l.TLS
95-
if tls != nil && tls.ServerName == "" {
94+
tlsConfig := l.TLS
95+
if tlsConfig != nil && tlsConfig.ServerName == "" {
9696
// Set the server name to the LDAP server address.
9797
colonPos := strings.LastIndex(ldapAddr, ":")
9898
if colonPos == -1 {
9999
colonPos = len(ldapAddr)
100100
}
101101
host := ldapAddr[:colonPos]
102-
tls = l.TLS.Clone()
103-
tls.ServerName = host
102+
tlsConfig = l.TLS.Clone()
103+
tlsConfig.ServerName = host
104104
}
105105

106106
if l.ServerInsecure {

0 commit comments

Comments
 (0)