Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.Exit(0) When execute handleSignal #5

Open
adamzhoul opened this issue Aug 6, 2021 · 0 comments
Open

os.Exit(0) When execute handleSignal #5

adamzhoul opened this issue Aug 6, 2021 · 0 comments

Comments

@adamzhoul
Copy link

env

github.com/HikoQiu/go-eureka-client/eureka v0.0.0-20200428035747-ac92e3f91f92

Background

  1. I have a go application, start an HTTPServer, and set eureka client to Run()
  2. handle signal to graceful shutdown HTTPServer

What's Unexpected

application exit when eureka client execute handleSignal
the application does not have a chance to execute graceful shutdown for HTTPServer

what's Expected

both graceful exit codes can be executed.

Why

Discussion

what if we remove that line: os.Exit(0)

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

No branches or pull requests

1 participant