mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
fix(shutdown): fix crash when shutting down before server and task scheduler have started. (#2148)
init shutdown routine after controller.Init() check for nil values before stopping http server and task scheduler. Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -69,6 +69,8 @@ func newServeCmd(conf *config.Config) *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
initShutDownRoutine(ctlr)
|
||||
|
||||
if err := ctlr.Run(); err != nil {
|
||||
log.Error().Err(err).Msg("failed to start controller, exiting")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user