How to return response when handling an uncaughtException event
Closed this issue · 3 comments
jpuncle commented
I want to call res.end()
to return the response to the browser client when handling an uncaughtException
event
fengmk2 commented
There is no way to send response to the res which cause the uncaughtException
.
And graceful will tell the next coming req and res don't keepalive and close connection after response sent. https://github.com/node-modules/graceful/blob/master/lib/graceful.js#L57 .
jpuncle commented
So I shoud set a shorter killTimeout
when the server graceful exit.
How could get the right killTimeout
fengmk2 commented
killTimeout default is 30s. It's enough for most http request.