portable mode: fix panic while validating TLS certificates

Fixes #1480

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-12-12 18:19:56 +01:00
parent 8812e5e450
commit a3d6d9cd33
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -299,6 +299,8 @@ func NewCertManager(keyPairs []TLSKeyPair, configDir, logSender string) (*CertMa
}
randSecs := rand.Intn(59)
manager.monitor()
if eventScheduler != nil {
_, err = eventScheduler.AddFunc(fmt.Sprintf("@every 8h0m%ds", randSecs), manager.monitor)
}
return manager, err
}