Skip to content

net: autoDestroy Socket#31806

Closed
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:net-use-autodestroy
Closed

net: autoDestroy Socket#31806
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:net-use-autodestroy

Conversation

@ronag

@ronag ronag commented Feb 15, 2020

Copy link
Copy Markdown
Member

Refactors net.Socket into using autoDestroy functionality of streams.

During this refactoring due to slightly different timing of things other bugs got activated and needed to be resolved.

Also, the behaviour of net.Socket and stream.Duplex needed to be consolidated to have the same generic behaviour in terms of allowHalfOpen.

Also fixes a close vs shutdown race #32486 (comment)

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

@ronag ronag added net Issues and PRs related to the net subsystem. stream Issues and PRs related to the stream subsystem. labels Feb 15, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag ronag force-pushed the net-use-autodestroy branch from 0117c05 to daabdb1 Compare February 15, 2020 01:23
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag

ronag commented Feb 15, 2020

Copy link
Copy Markdown
Member Author

If backporting autoDestroy would have to be explicitly set to true.

@mcollina mcollina added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 15, 2020

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mcollina

Copy link
Copy Markdown
Member

I prefer this to land as a semver-major commit.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 15, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

lpinca
lpinca previously approved these changes Feb 16, 2020
@nodejs-github-bot

nodejs-github-bot commented Apr 1, 2020

Copy link
Copy Markdown
Collaborator

@ronag

ronag commented Apr 1, 2020

Copy link
Copy Markdown
Member Author

CI passes

@ronag ronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 1, 2020
@ronag

ronag commented Apr 1, 2020

Copy link
Copy Markdown
Member Author

@mcollina @benjamingr PTAL @addaleax

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@ronag

ronag commented Apr 2, 2020

Copy link
Copy Markdown
Member Author

Seems to be quite a bit of failures on CITGM though I don't think they are related to this PR. I'd appreciate a second opinion @Trott @MylesBorins. #31806 (comment)

@ronag

ronag commented Apr 2, 2020

Copy link
Copy Markdown
Member Author

Nevermind, CITGM looks good. This PR actually has fever failures than master (for some reason?).

@mcollina

mcollina commented Apr 2, 2020

Copy link
Copy Markdown
Member

@nodejs/tsc this needs another approval.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I’m not sure I understand why this is necessary either, but I agree that the test functionality shouldn’t be affected – the important thing is that the .once('error') handler below fires.

@ronag

ronag commented Apr 2, 2020

Copy link
Copy Markdown
Member Author

Landed in efefdd6

@ronag ronag closed this Apr 2, 2020
ronag added a commit that referenced this pull request Apr 2, 2020
Refactors net.Socket into using autoDestroy functionality
of streams.

PR-URL: #31806
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
ronag referenced this pull request Apr 28, 2020
Writable stream could emit 'finish' after 'close'.

PR-URL: #32933
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Trott added a commit to Trott/io.js that referenced this pull request Jul 12, 2020
Set `allowHalfOpen: true` in the client.

Fixes: nodejs#29802
Refs: nodejs#31806
addaleax pushed a commit that referenced this pull request Jul 14, 2020
Set `allowHalfOpen: true` in the client.

Fixes: #29802
Refs: #31806

PR-URL: #34318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2020
Set `allowHalfOpen: true` in the client.

Fixes: #29802
Refs: #31806

PR-URL: #34318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
MylesBorins pushed a commit that referenced this pull request Jul 16, 2020
Set `allowHalfOpen: true` in the client.

Fixes: #29802
Refs: #31806

PR-URL: #34318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
cjihrig pushed a commit that referenced this pull request Jul 23, 2020
Set `allowHalfOpen: true` in the client.

Fixes: #29802
Refs: #31806

PR-URL: #34318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. net Issues and PRs related to the net subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants