restify / restify/node-restify
To not break the chain when the client closed the connection
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 975
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 5
Description
- Used appropriate template for the issue type
- Searched both open and closed issues for duplicates of this issue
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing related PR #891 and the request-handling behavior around a client closing the connection. Define the server or handler API and verify that cleanup can continue while an unexpected res.send() after disconnection can raise an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100