mirror of
https://github.com/rancher/dynamiclistener.git
synced 2025-07-13 22:44:04 +00:00
Merge pull request #44 from cmurphy/fix-type
Fix net.Conn type assertion
This commit is contained in:
commit
cd5d71f2fe
@ -299,7 +299,7 @@ func (l *listener) getCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate,
|
||||
}
|
||||
}
|
||||
|
||||
return l.loadCert(newConn.(*closeWrapper))
|
||||
return l.loadCert(newConn)
|
||||
}
|
||||
|
||||
func (l *listener) updateCert(cn ...string) error {
|
||||
@ -341,7 +341,7 @@ func (l *listener) updateCert(cn ...string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *listener) loadCert(currentConn *closeWrapper) (*tls.Certificate, error) {
|
||||
func (l *listener) loadCert(currentConn net.Conn) (*tls.Certificate, error) {
|
||||
l.RLock()
|
||||
defer l.RUnlock()
|
||||
|
||||
@ -381,7 +381,7 @@ func (l *listener) loadCert(currentConn *closeWrapper) (*tls.Certificate, error)
|
||||
}
|
||||
_ = conn.close()
|
||||
}
|
||||
l.conns[currentConn.id].ready = true
|
||||
l.conns[currentConn.(*closeWrapper).id].ready = true
|
||||
l.connLock.Unlock()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user