Make Control safe to stop and wait on from any lifecycle state (#1794)

This commit is contained in:
Nate Brown
2026-07-10 10:35:17 -05:00
committed by GitHub
parent 5ecdd4eaa9
commit ab736e4c6b
10 changed files with 441 additions and 58 deletions
+2 -3
View File
@@ -84,8 +84,7 @@ func main() {
}
if !*configTest {
wait, err := ctrl.Start()
if err != nil {
if err := ctrl.Start(); err != nil {
util.LogWithContextIfNeeded("Error while running", err, l)
os.Exit(1)
}
@@ -93,7 +92,7 @@ func main() {
go ctrl.ShutdownBlock()
notifyReady(l)
if err := wait(); err != nil {
if err := ctrl.Wait(); err != nil {
l.Error("Nebula stopped due to fatal error", "error", err)
os.Exit(2)
}