Skip to content

Commit

Permalink
Add graceful shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghaowei0107 committed Jan 24, 2024
1 parent 0620b69 commit ae21a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func main() {
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
_quit := <-quit
log.Infof("Receive exit signal,bye! Signal: %s", _quit.String())
log.Infof("Received %s signal, exiting", _quit.String())
// Create a context with a timeout
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
Expand Down

0 comments on commit ae21a0a

Please sign in to comment.