-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
net,stream: remove DuplexBase #19779
Conversation
`DuplexBase` was added to prevent the "no-half-open enforcer" from being inherited by `net.Socket`. The main reason to use it instead of `Duplex` was that it allowed to not copy the options object but since commit 5e3f516 the options object is copyed anyway so it is no longer useful.
This basically reverts df07169. |
lib/_stream_duplex.js
Outdated
util.inherits(Duplex, Readable); | ||
|
||
{ | ||
// avoid scope creep, the keys array can then be collected |
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.
I don’t know about you, but “scope creep” means something pretty different for me… ;)
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.
Haha.
lib/net.js
Outdated
else | ||
options = util._extend({}, options); | ||
|
||
const aho = options.allowHalfOpen; |
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.
tiny nit: I’d spell this out
60d96f7
to
5c397d9
Compare
Landed in 496d602. |
`DuplexBase` was added to prevent the "no-half-open enforcer" from being inherited by `net.Socket`. The main reason to use it instead of `Duplex` was that it allowed to not copy the options object but since commit 5e3f516 the options object is copyed anyway so it is no longer useful. PR-URL: #19779 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
`DuplexBase` was added to prevent the "no-half-open enforcer" from being inherited by `net.Socket`. The main reason to use it instead of `Duplex` was that it allowed to not copy the options object but since commit 5e3f516 the options object is copyed anyway so it is no longer useful. PR-URL: #19779 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
DuplexBase
was added to prevent the "no-half-open enforcer" frombeing inherited by
net.Socket
. The main reason to use it insteadof
Duplex
was that it allowed to not copy the options object butsince commit 5e3f516 the options object is copyed anyway so it is
no longer useful.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes