make TLS reload thread-safe on TCP listener

This commit is contained in:
Aine
2023-02-13 11:58:31 +02:00
parent a7d5207484
commit dbe4a73174
2 changed files with 13 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ func (m *Manager) listen(port string, tlsConfig *tls.Config) {
// loadTLSConfig returns true if certs were loaded and false if not
func (m *Manager) loadTLSConfig() bool {
m.log.Debug("loading SSL certs...")
m.log.Info("(re)loading TLS config")
if len(m.tls.Certs) == 0 || len(m.tls.Keys) == 0 {
m.log.Warn("SSL certificates are not provided")
return false