No longer warns on res.close event#22
Conversation
See: nodejs/node#20611 res.close is always triggered and is no longer considered and error or warning condition
|
I think that change in #20611 is incosistent with the documentation of close event - "Indicates that the underlying connection was terminated before response.end() was called or able to flush." - this is not true anymore - event close is called always. Either the documentation should be changed or this PR should be reverted or fixed. I don't know if it is intended behaviour (then isn't it a API change - SEMVER-MAJOR?), but from my point of view only unintended side efect of the fix. Previous functionality can be achieved by testing res.finished in close event... |
|
@tellnes any plans to merge this PR? 🙏 |
|
This doesn't seem to be getting merged so forked and fixed. |
|
Sorry for the delay, merged. I'll publish to npm soon. |
See: nodejs/node#20611
res.close is always triggered and is no longer considered and error or warning condition
Addresses: #21