Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@joeirimpan
Copy link
Member

No description provided.

@joeirimpan
Copy link
Member Author

cc @kalbhor

go func() {
defer wg.Done()
// Wait till main ctx is cancelled.
<-globalCtx.Done()
Copy link
Member Author

@joeirimpan joeirimpan Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

globalCtx is only cancelled on SIGINT/SIGTERM. For stop-at-end scenarios, we need to force cancel the forked context and gracefully exit all routines. If not, healthcheck goroutines will lurk around and program hangs waiting for SIGINT/SIGTERM.

@joeirimpan
Copy link
Member Author

Closing in favour of #35

@joeirimpan joeirimpan closed this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants