-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No finish/close event on aborted http-response - race condition #1309
Comments
+1 |
Proposed fix see pull request #1373 |
The fix for this (#1411, semver-major) is now on track for the 3.0.0 release. |
Could it please be released earlier? I'm afraid 3.0.0 won't come soon. |
3.0.0 is out and this landed in it. :) https://iojs.org/dist/v3.0.0/ |
Fixes memory leak caused by nodejs/node#1309
I've found something similar here, which you can emulate with node v4 and v5... just by sending the https://gist.github.com/evantahler/2f6c4241c47d7c89f5555d833475c8b8 |
When tracking requests of a HTTP-Server - with
server.on('request')
andres.on('finish', ...)
orres.on('close', ...)
- we noticed inconsistent results over time (requests that are never finished or closed).We tracked this race condition down to the following reproducable test case:
-> No "close" and no "finish" event on response!
setImmediate()
call, you get a response close event (which is fine)setImmediate()
call, you get a response finish event (which is fine)setImmediate()
, two events are delivered (finish AND close)The text was updated successfully, but these errors were encountered: