setTimeout method of net.Socket should return this#32722
Closed
LongTengDao wants to merge 2 commits intonodejs:masterfrom
LongTengDao-fork-A:master
Closed
setTimeout method of net.Socket should return this#32722LongTengDao wants to merge 2 commits intonodejs:masterfrom LongTengDao-fork-A:master
LongTengDao wants to merge 2 commits intonodejs:masterfrom
LongTengDao-fork-A:master
Conversation
addaleax
approved these changes
Apr 8, 2020
cjihrig
approved these changes
Apr 8, 2020
Member
|
need a test update for this? diff --git a/test/parallel/test-net-socket-timeout.js b/test/parallel/test-net-socket-timeout.js
index 8b197b44d6..e01304afe5 100644
--- a/test/parallel/test-net-socket-timeout.js
+++ b/test/parallel/test-net-socket-timeout.js
@@ -70,8 +70,12 @@ for (let i = 0; i < invalidCallbacks.length; i++) {
const server = net.Server();
server.listen(0, common.mustCall(() => {
const socket = net.createConnection(server.address().port);
- socket.setTimeout(1, common.mustCall(() => {
- socket.destroy();
- server.close();
- }));
+ assert.strictEqual(
+ socket.setTimeout(1, common.mustCall(() => {
+ socket.destroy();
+ assert.strictEqual(socket.setTimeout(1, common.mustNotCall()), socket);
+ server.close();
+ })),
+ socket
+ );
})); |
Contributor
Author
|
@himself65 Thank you! |
himself65
approved these changes
Apr 9, 2020
Collaborator
Flarna
approved these changes
Apr 9, 2020
lpinca
approved these changes
Apr 9, 2020
ronag
approved these changes
Apr 9, 2020
ZYSzys
approved these changes
Apr 10, 2020
Collaborator
jasnell
approved these changes
Apr 10, 2020
Contributor
Author
What's this? Should I do something? |
trivikr
approved these changes
Apr 11, 2020
Member
no, we will land this after ci all green(ci sometimes will crash, I don’t know why) |
himself65
pushed a commit
to himself65/node
that referenced
this pull request
Apr 11, 2020
Function setTimeout in net.Socket should return this, not undefined, as doc said. PR-URL: nodejs#32722 Refs: https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Member
|
Landed in 4439009 Thanks for your contributions!🎉 |
Member
|
BTW, I reword the commit message for following the commit rules |
targos
pushed a commit
that referenced
this pull request
Apr 12, 2020
Function setTimeout in net.Socket should return this, not undefined, as doc said. PR-URL: #32722 Refs: https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs
pushed a commit
that referenced
this pull request
Apr 14, 2020
Function setTimeout in net.Socket should return this, not undefined, as doc said. PR-URL: #32722 Refs: https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
targos
pushed a commit
that referenced
this pull request
Apr 22, 2020
Function setTimeout in net.Socket should return this, not undefined, as doc said. PR-URL: #32722 Refs: https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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.
setTimeout method of net.Socket should return this, not undefined, as doc said.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes