Nil check before logging (#207)

This commit is contained in:
Antonio Mika 2022-09-23 12:53:05 -04:00 committed by GitHub
parent 55fc6a9f76
commit 93fd493922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -652,7 +652,11 @@ func (cfg *Config) renewDynamicCertificate(ctx context.Context, hello *tls.Clien
cfg.certCache.removeCertificate(currentCert)
cfg.certCache.mu.Unlock()
unblockWaiters()
log.Error("certificate should not be obtained", zap.Error(err))
if log != nil {
log.Error("certificate should not be obtained", zap.Error(err))
}
return Certificate{}, err
}