[v4.x backport] tls: fix writeQueueSize prop, long write timeouts#16422
Closed
apapirovski wants to merge 3 commits intonodejs:v4.x-stagingfrom
Closed
[v4.x backport] tls: fix writeQueueSize prop, long write timeouts#16422apapirovski wants to merge 3 commits intonodejs:v4.x-stagingfrom
apapirovski wants to merge 3 commits intonodejs:v4.x-stagingfrom
Conversation
refack
approved these changes
Oct 24, 2017
Contributor
Author
ab9be2a to
5d9164c
Compare
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. PR-URL: nodejs#15791 Fixes: nodejs#15005 Refs: nodejs#15006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Add updateWriteQueueSize which updates and returns queue size (net & tls). Make _onTimeout check whether an active write is ongoing and if so, call _unrefTimer rather than emitting a timeout event. Add http & https test that checks whether long-lasting (but active) writes timeout or can finish writing as expected. PR-URL: nodejs#15791 Fixes: nodejs#15082 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
6c659aa to
96f7df8
Compare
Contributor
Author
|
CI is all green (failure unrelated) and I've rebased. |
Contributor
Author
|
This is blocked because of #16484 — working on a PR which will then need to be applied here. |
This commit handles the case where _onTimeout is called with a null handle. Refs: nodejs#15791 Fixes: nodejs#16484 PR-URL: nodejs#16489 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Contributor
Author
|
Last commit is technically from a different PR but this shouldn't land without it. |
Contributor
|
TBQH, I'm nervous about this landing in v4.x due to the regression that we found. Yes it was only a single regression, but with 4.x going EOL in the next 6 months I'm not sure that the benefit outweighs the risk /cc @nodejs/lts thoughts? |
Member
|
I'm 👎 on landing this on v4. |
Contributor
Author
|
Seems sensible. Closing this. :) |
This was referenced May 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a backport of #15791 as requested.
/cc @MylesBorins
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
net, tls, test