Skip to content

Conversation

@sam-github
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

net,doc

@sam-github
Copy link
ContributorAuthor

@sam-githubsam-github added the semver-minor PRs that contain new features and should be released in the next minor version. label Jun 7, 2017
@gibfahn
Copy link
Member

What's the reason behind this change?

Also do you need to return this in Line 17? I assume you're not doing that because it's an error handler.

LGTM otherwise.

@sam-github
Copy link
ContributorAuthor

What's the reason behind this change?

Method chaining, that's how I found the .end() not returning this, I tried to do .end().on(..., and it blew up. the destroy() I found by auditing.

Also do you need to return this in Line 17?

I do, that is a bug, thank you.

Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit addressed.

Copy link
Member

@mhdawsonmhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sam-githubsam-githubforce-pushed the socket-destroy-return-this branch from 6d4b1ad to 1fd74f9CompareJune 8, 2017 22:10
@sam-github
Copy link
ContributorAuthor

Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the test inside one of the stream-*-destroy files, and rename the commit and PR as "streams: ".

Good spot!

cc @nodejs/streams

doc/api/net.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be consistent, maybe a

* Returns:{net.Socket}

should be added too for metadata?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouph, there isn't much consistency anywhere in net.md on how returns are documented. I'll update #13531 to fix the inconsistencies, and then update this one.

@mcollina
Copy link
Member

Can you also add it to the streams doc?

doc/api/net.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other areas of the docs, the return is listed as a bullet point along with the arguments. This should follow that convention.

@sam-githubsam-githubforce-pushed the socket-destroy-return-this branch from 1fd74f9 to daded61CompareJune 13, 2017 20:46
@sam-github
Copy link
ContributorAuthor

@jasnell@mcollina PTAL

@sam-githubsam-githubforce-pushed the socket-destroy-return-this branch from 37c0a72 to 7be0be1CompareJune 14, 2017 15:50
@sam-github
Copy link
ContributorAuthor

PR-URL: nodejs#13530 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
@sam-githubsam-githubforce-pushed the socket-destroy-return-this branch from 7be0be1 to cf24177CompareJune 14, 2017 20:16
@sam-githubsam-github merged commit cf24177 into nodejs:masterJun 14, 2017
@sam-githubsam-github deleted the socket-destroy-return-this branch June 14, 2017 20:17
addaleax pushed a commit that referenced this pull request Jun 17, 2017
PR-URL: #13530 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
@addaleaxaddaleax mentioned this pull request Jun 17, 2017
addaleax pushed a commit that referenced this pull request Jun 21, 2017
PR-URL: #13530 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit that referenced this pull request Jun 24, 2017
PR-URL: #13530 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
rvagg pushed a commit that referenced this pull request Jun 29, 2017
PR-URL: #13530 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit that referenced this pull request Jul 11, 2017
PR-URL: #13530 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@sam-github@gibfahn@mcollina@refack@jasnell@Fishrock123@TimothyGu@cjihrig@tniessen@mhdawson