mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
portable mode: fix panic while validating TLS certificates
Fixes #1480 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
8812e5e450
commit
a3d6d9cd33
1 changed files with 3 additions and 1 deletions
|
@ -299,6 +299,8 @@ func NewCertManager(keyPairs []TLSKeyPair, configDir, logSender string) (*CertMa
|
||||||
}
|
}
|
||||||
randSecs := rand.Intn(59)
|
randSecs := rand.Intn(59)
|
||||||
manager.monitor()
|
manager.monitor()
|
||||||
_, err = eventScheduler.AddFunc(fmt.Sprintf("@every 8h0m%ds", randSecs), manager.monitor)
|
if eventScheduler != nil {
|
||||||
|
_, err = eventScheduler.AddFunc(fmt.Sprintf("@every 8h0m%ds", randSecs), manager.monitor)
|
||||||
|
}
|
||||||
return manager, err
|
return manager, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue