From b68df4e61a1c49682c764d218b1e89bb6ba40bae Mon Sep 17 00:00:00 2001 From: Tim Holm Date: Wed, 6 Nov 2024 10:16:35 +1100 Subject: [PATCH] fix: log fatal and exit 1 on non-nil error. (#694) --- core/pkg/server/run.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/pkg/server/run.go b/core/pkg/server/run.go index f721e5dc0..f53e6cf54 100644 --- a/core/pkg/server/run.go +++ b/core/pkg/server/run.go @@ -40,7 +40,8 @@ func Run(m *NitricServer) { select { case serverErr := <-errChan: if serverErr != nil { - logger.Errorf("Nitric Server Error: %v, exiting\n", serverErr) + logger.Fatalf("Nitric Server Error: %v, exiting\n", serverErr) + os.Exit(1) } // Closed channel, server stopped logger.Debugf("Nitric Server Stopped\n")