Shut down after errors
Opened this issue · 2 comments
andreyvit commented
According to the domain module docs (and common sense), in case of an unhandled exception the process should stop accepting new connections and eventually shut down.
A sane default behavior would be to stop listening on http port(s) and do a process.exit
from setTimeout
with a reasonable delay (30 seconds?), plus an event to add any app-specific shutdown logic.
yalamber commented
is this possible? did you find any way to do this?
fengmk2 commented
I have done this with "graceful" module, you can check it out.