node-restify
node-restify copied to clipboard
To not break the chain when the client closed the connection
- [x] Used appropriate template for the issue type
- [x] Searched both open and closed issues for duplicates of this issue
- [x] Title adequately and concisely reflects the feature or the bug
Feature Request
An option to allow chains to be broken when the client closes the request.
Use Case
There are some cases where you might need to do some clean up even if the client closed the connection.
Also, suppose you have a res.send() call somewhere after the client has closed the request. You should be able to get an exception out of it since you were clearly not expecting this disconnection to happen.
Example API
I have no idea.
- Maybe this should go on the server settings?
{ breakOnClosedSocket: true } - Maybe on the handler code?
res.ignoreSocketClose
Are you willing and able to implement this?
Yes, I think.
- Related PR: #891