Skip to content

Conversation

@multi-io
Copy link

Correct me if I'm overlooking something, but the serverCh serves no function (anymore?), and server.Shutdown() returns normally if the shutdown worked, so we get to the end of main() and want to exit 0, not 2. I could definitely reproduce that the current upstream version always exits 2 when terminated with SIGTERM/SIGINT, which is at the very least an annoyance.

@hashicorp-cla
Copy link

hashicorp-cla commented Dec 24, 2023

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Olaf Klischat <olaf.klischat@gmail.com>

// If we got this far, it was an interrupt, so don't exit cleanly
os.Exit(2)
os.Exit(0)

Choose a reason for hiding this comment

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

why are we changing the exit code from 2 to 0? wouldn't 2 be more appropriate in case you receive events corresponding to os.Interrupt, syscall.SIGTERM ?

The other change does make sense to me. We also don't have any <-serverCh in main.go that would wait for close(serverCh)

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.

3 participants