Skip to content

Commit

Permalink
chore(server): rehister shutdown handlers before checking for admin api
Browse files Browse the repository at this point in the history
  • Loading branch information
unkn0wn-root committed Nov 30, 2024
1 parent ae16afc commit 600b32e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ func (s *Server) Start() error {
}
}

// Register shutdown handlers
s.registerShutdownHandlers()

if s.adminAPI == nil {
s.logger.Warn("Admin API is not enabled. Bypassing admin server setup")
return nil
Expand All @@ -217,9 +220,6 @@ func (s *Server) Start() error {
return err
}

// Register shutdown handlers
s.registerShutdownHandlers()

return nil
}

Expand Down

0 comments on commit 600b32e

Please sign in to comment.