work on signal handling

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2024-10-28 14:47:11 +01:00
parent dde999d5c2
commit 32287da09e
4 changed files with 17 additions and 3 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"net"
"net/http"
"net/rpc"
"os"
"sort"
"strings"
"time"
@@ -515,7 +514,7 @@ func trap(s *Service, ctx context.Context) {
}
}
s.Log.Debug().Str("service", "runtime service").Msgf("terminating with signal: %v", s)
os.Exit(0)
//os.Exit(0) // this seems to cause an early exit that prevents services from shitting down properly
}
// pingNats will attempt to connect to nats, blocking until a connection is established