-
Notifications
You must be signed in to change notification settings - Fork 985
Open
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
Restify Version: 10.0.0
Node.js Version: 18.12.1
Expected behaviour
once the response is closed or sent to the client, the "chain handler" must be terminated
Actual behaviour
The "chain handler" still continues when the response has been destroyed
Repro case
case 1:
server.get('*',async(req, res) => {
console.log('----first----');
res.send('first');
}, async(req, res) => {
console.log('----second----');
res.send('second');
});
case 2:
server.get('*', async(req, res) => {
console.log('----first----');
res.send('first');
}, (req, res, next) => {
console.log('----second----');
res.send('second');
});
Cause
Line 143 in adf24c1
if (!handler || req.connectionState() === 'close') { |
Are you willing and able to fix this?
yes
Metadata
Metadata
Assignees
Labels
No labels