Skip to content

Commit c38f528

Browse files
committed
RHINENG-21760: add additional debug logs for shutdown
1 parent e9178c5 commit c38f528

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

base/base.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func HandleSignals() {
2626
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
2727
go func() {
2828
<-c
29+
utils.LogDebug("SIGTERM/SIGINT received")
2930
CancelContext()
3031
utils.LogInfo("SIGTERM/SIGINT handled")
3132
}()

base/utils/gin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func RunServer(ctx context.Context, handler http.Handler, port int) error {
108108
srv := http.Server{Addr: addr, Handler: handler, ReadHeaderTimeout: ReadHeaderTimeout, MaxHeaderBytes: 65535}
109109
go func() {
110110
<-ctx.Done()
111+
LogDebug("gracefully shutting down server...")
111112
err := srv.Shutdown(context.Background())
112113
if err != nil {
113114
LogError("err", err.Error(), "server shutting down failed")

0 commit comments

Comments
 (0)