Skip to content

Commit

Permalink
portable mode: fix panic while validating TLS certificates
Browse files Browse the repository at this point in the history
Fixes #1480

Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Dec 12, 2023
1 parent 61fe7c3 commit ff2eed8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion internal/common/tlsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions internal/vfs/s3fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ff2eed8

Please sign in to comment.