http2: compat avoid bind and properly cleanup stream#20374
http2: compat avoid bind and properly cleanup stream#20374ronag wants to merge 1 commit intonodejs:masterfrom
Conversation
ebc8bb2 to
34ad49a
Compare
d57ba33 to
6c86160
Compare
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
Why these extra variables instead of just:
this.sendTrailers(this[kResponse][kTrailers]);?
There was a problem hiding this comment.
No particular reason. Just style. I'm fine with changing if you want me to?
6c86160 to
8a5874a
Compare
lib/internal/http2/compat.js
Outdated
8a5874a to
96b0de9
Compare
apapirovski
left a comment
There was a problem hiding this comment.
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.
onStreamCloseRequest? It's not really onRequestFinish.
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
Please don't reassign this.
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
Are all these detachments necessary? It will certainly make performance worse.
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
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.
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.
This change doesn't seem to relate to this PR.
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
This change doesn't seem to relate to this PR.
d7a0fbd to
525429a
Compare
|
@apapirovski cleaned up |
20d1dce to
93c4f7d
Compare
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
res === undefined would be cleaner check here.
lib/internal/http2/compat.js
Outdated
There was a problem hiding this comment.
req === undefined is more precise. Also please move const state = after the check.
93c4f7d to
823bc93
Compare
823bc93 to
ae50653
Compare
|
ping @nodejs/http2 would be nice to have at least one more review on this. |
Can you add a test for this? |
|
FWIW I don't think it's possible to test this without exporting the |
|
👍 to exporting in the internal module. |
|
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 <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
|
Landed in 0d762af |
PR-URL: #20374 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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