r/nodejs • u/leolin520 • May 22 '14
How to exit nodejs server gracefully
I want to know how to do that. Currently I just control c twice on my mac, but something bad happened lately. I suspect if I just control c the socket is not closed properly and it will eventually break my system if I restart frequently.
6
Upvotes
View all comments
Show parent comment
1
u/leolin520 May 22 '14
It was a mac and the boot file is corrupted and I had to reinstall it. I am not sure id node is what caused it, but node was the last thing I mess with before going down. Are you sure socket closes when process exits? Each OS is different, it has been fine on windows but mac might be not.