Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
http2: compat avoid bind and properly cleanup stream#20374
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ronag commented Apr 27, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
ebc8bb2 to 34ad49aCompared57ba33 to 6c86160Comparelib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these extra variables instead of just:
this.sendTrailers(this[kResponse][kTrailers]);?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason. Just style. I'm fine with changing if you want me to?
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stream should be this
apapirovski left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is on a good track but needs a bit of cleanup.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onStreamCloseRequest? It's not really onRequestFinish.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't reassign this.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all these detachments necessary? It will certainly make performance worse.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: more accurate name and don't re-assign this please.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. Unless this is 100% necessary, it would be better not to.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't seem to relate to this PR.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't seem to relate to this PR.
d7a0fbd to 525429aCompareronag commented Apr 28, 2018
@apapirovski cleaned up |
20d1dce to 93c4f7dComparelib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
res === undefined would be cleaner check here.
lib/internal/http2/compat.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
req === undefined is more precise. Also please move const state = after the check.
apapirovski left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
apapirovski commented Apr 28, 2018
apapirovski commented May 7, 2018
ping @nodejs/http2 would be nice to have at least one more review on this. |
mcollina commented May 7, 2018
Can you add a test for this? |
apapirovski commented May 7, 2018
FWIW I don't think it's possible to test this without exporting the |
mcollina commented May 7, 2018
👍 to exporting in the internal module. |
apapirovski commented May 14, 2018
CI: https://ci.nodejs.org/job/node-test-pull-request/14865/ I will land this once done and create a test myself in a separate PR. |
PR-URL: #20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
apapirovski commented May 16, 2018
Landed in 0d762af |
PR-URL: #20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Backport-PR-URL: #22850 PR-URL: #20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Avoid unnecessary function
bind.Also fixes a bug where
kProxySocketwas assignednullon the wrong object as well as properly cleanup the stream object.Checklis
make -j4 test(UNIX), orvcbuild test(Windows) passes