diff --git a/internal/common/tlsutils.go b/internal/common/tlsutils.go index f6ac1382d..a96b9acae 100644 --- a/internal/common/tlsutils.go +++ b/internal/common/tlsutils.go @@ -308,6 +308,8 @@ func NewCertManager(keyPairs []TLSKeyPair, configDir, logSender string) (*CertMa } randSecs := rand.Intn(59) 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 } diff --git a/internal/vfs/s3fs.go b/internal/vfs/s3fs.go index 0f280aa7a..3c0c7c700 100644 --- a/internal/vfs/s3fs.go +++ b/internal/vfs/s3fs.go @@ -699,8 +699,8 @@ func (fs *S3Fs) Walk(root string, walkFn filepath.WalkFunc) error { continue } err := walkFn(util.GetStringFromPointer(fileObject.Key), - NewFileInfo(name, isDir, util.GetIntFromPointer(fileObject.Size), util.GetTimeFromPointer(fileObject.LastModified), - false), nil) + NewFileInfo(name, isDir, util.GetIntFromPointer(fileObject.Size), + util.GetTimeFromPointer(fileObject.LastModified), false), nil) if err != nil { return err }