Don't reset connections on the first load of the certs

This commit is contained in:
Darren Shepherd
2021-06-16 00:59:59 -07:00
parent db883ae66a
commit 9865ae859c

View File

@@ -370,7 +370,7 @@ func (l *listener) loadCert() (*tls.Certificate, error) {
}
// cert has changed, close closeWrapper wrapped connections if this isn't the first load
if l.conns != nil && l.cert == nil {
if l.conns != nil && l.cert != nil {
l.connLock.Lock()
for _, conn := range l.conns {
_ = conn.close()