-
Notifications
You must be signed in to change notification settings - Fork 0
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
Best way to shutdown on exit? #3
Comments
Is it not stopping the process, or is it never calling the callback? That code is just issuing a call to |
Yup, looked through the code and did not see anything crazy but in researching I did find this comment: https://nodejs.org/api/process.html#process_event_exit Agreed, re: the pid. |
Hmm, yeah since nginx is in a separate process, it's kind of hard to be synchronous with that... I'll think about it for a while. If you come up with something, please let me know. |
Will do! |
I've been trying to reproduce this issue, with no luck. When calling server.stop() in the One thing I found though: the @amcdnl Any thoughts on this? Did you verify that the |
I was using ctrl+c ... makes sense ... wonder why that is! |
For catching Ctrl-C and closing the server, use something like this (not tested):
|
Found a bit more info here: nodejs/node#2853 |
Would be nice to incorporate this into the project. ;) |
FYI -> |
I'm on windows, could be my issue. |
FYI: this seemed to do the trick:
|
I'm closing this since got a work around. |
I'm trying to kill the process when the server exits, I'm thinking something like this:
but it doesn't always work. This is probably sometime you need to handle internally too tho. Thoughts?
The text was updated successfully, but these errors were encountered: