net: honor default values in Socket constructor#19971
net: honor default values in Socket constructor#19971santigimeno wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Is this Line 288 in 5a8fcd0 still needed with this change? |
|
Can a test be included for this? |
|
This also changes the default value for const socket = new net.Socket(fd);
assert(socket.readable);
assert(socket.writable); |
Good catch. I'll remove that line.
Will do
Yes, isn't that what the documentation implies? |
|
Yes it seems consistent with the docs but not with the code, not sure which one is correct :) |
lib/internal/wrap_js_stream.js
Outdated
There was a problem hiding this comment.
Just a thought, but I think it might be more correct to forward these values from stream itself?
4a21f02 to
e4fdba2
Compare
|
Updated with comments addressed. PTAL. Thanks |
|
CI has a lot of red. |
|
Yes, I have to fix the test for Windows. The other failures seem unrelated. |
Specifically `readable` and `writable` that default to `false`. Fixes: libuv/libuv#1794
e4fdba2 to
485bea9
Compare
|
Added a fix for the test. New CI: https://ci.nodejs.org/job/node-test-pull-request/14400/ |
|
CI looks good now. |
lpinca
left a comment
There was a problem hiding this comment.
LGTM. I'm only a little worried about the behavior change described in #19971 (comment).
Should we consider it a bug fix?
|
Might as well run CitGM if we have concerns: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1380/ |
|
Landed in 67e2a15 🎉 |
Specifically `readable` and `writable` that default to `false`. PR-URL: nodejs#19971 Fixes: libuv/libuv#1794 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
|
Are we ok with this being semver-patch? |
Specifically `readable` and `writable` that default to `false`. PR-URL: #19971 Fixes: libuv/libuv#1794 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Specifically
readableandwritablethat default tofalse.Fixes: libuv/libuv#1794
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes