feat: added better message on heartbeat

This commit is contained in:
=
2025-02-21 16:45:35 +05:30
parent 17e576511b
commit 9b44972e77
2 changed files with 8 additions and 6 deletions

View File

@@ -46,14 +46,15 @@ var gatewayCmd = &cobra.Command{
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
sigStopCh := make(chan bool, 1)
ctx, cancel := context.WithCancel(cmd.Context())
defer cancel()
go func() {
<-sigCh
close(sigStopCh)
cancel()
}()
ctx, cancel := context.WithCancel(cmd.Context())
defer cancel()
for {
select {
case <-sigStopCh: