Uh oh!
There was an error while loading. Please reload this page.
net,tls,test: remove writeQueueSize and fix bufferSize - #15006
Conversation
When use TLSSocket, bufferSize is always +1, this affects users who rely on this property to make judgments. This commit removed legacy code and corrected the calculation of bufferSize. Fixes: nodejs#15005
jasnell
commented
Aug 24, 2017
hmm... would this end up being a semver-major?? It's really not clear. |
indutny
commented
Aug 24, 2017
I'm afraid this may not be a correct change. |
BridgeAR
commented
Aug 31, 2017
@indutny do you have a suggestion how to handle this properly? |
BridgeAR
commented
Sep 13, 2017
Ping @indutny |
BridgeAR
commented
Sep 19, 2017
Ping @nodejs/crypto @mcollina |
mcollina
commented
Sep 19, 2017
I cannot help but I trust @indutny. |
@indutny would you be so kind and give a hint how the correct approach would look like? |
indutny
commented
Sep 24, 2017
@BridgeAR sorry for delay. Technically it might be possible to keep the number of pending bytes in that property. Perhaps it should be approached in a way of fixing it rather than removing it? |
BridgeAR
commented
Sep 24, 2017
As far as I see it the proper fix for the |
indutny
commented
Sep 24, 2017
Hm... on a second thought this might be a right way to do it indeed. Still the check if |
| // If it was entirely flushed, we can write some more right now. | ||
| // However, if more is left in the queue, then wait until that clears. | ||
| if (req.async && this._handle.writeQueueSize !== 0) |
There was a problem hiding this comment.
This condition should be left as it is.
BridgeAR
commented
Oct 2, 2017
Ping @micooz |
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. Fixes: nodejs#15005 Refs: nodejs#15006
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: #15791Fixes: #15005 Refs: #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>
apapirovski
commented
Oct 21, 2017
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: #15791Fixes: #15005 Refs: #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>
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#15791Fixes: 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>
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/node#15791Fixes: nodejs/node#15005 Refs: nodejs/node#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>
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/node#15791Fixes: nodejs/node#15005 Refs: nodejs/node#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>
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#15791Fixes: 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>
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. Backport-PR-URL: #16420 PR-URL: #15791Fixes: #15005 Refs: #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>
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. Backport-PR-URL: #16420 PR-URL: #15791Fixes: #15005 Refs: #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>
When use TLSSocket, bufferSize is always +1, this affects users who
rely on this property to make judgments. This commit removed legacy
code and corrected the calculation of bufferSize.
Fixes: #15005
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
net, tls, test