GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — net: use `_final` instead of `on('finish')` by addaleax · Pull Request #18608 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented Feb 7, 2018

Copy link
Copy Markdown
Member

Shutting down the connection is what _final is there for.

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

net

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added the net Issues and PRs related to the net subsystem. label Feb 7, 2018
lpinca
lpinca approved these changes Feb 7, 2018
View reviewed changes
Comment thread lib/net.js Outdated

@lpinca lpinca Feb 7, 2018

Copy link
Copy Markdown
Member

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.

Nit: I'd remove handling 'finish' as we are no longer handling the 'finish' event.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@addaleax addaleax Feb 7, 2018

Copy link
Copy Markdown
Member Author

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.

@lpinca done! And thanks for the reviews, it’s really helpful to talk this through with you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lpinca reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@addaleax addaleax mentioned this pull request Feb 7, 2018
net: inline and simplify onSocketEnd #18607
Closed
2 tasks done
jasnell
jasnell approved these changes Feb 9, 2018
View reviewed changes
@BridgeAR

BridgeAR commented Feb 10, 2018

Copy link
Copy Markdown
Member

@addaleax please always trigger a CI after opening a PR :-)

CI https://ci.nodejs.org/job/node-test-pull-request/13089/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Feb 10, 2018

Copy link
Copy Markdown
Member Author

please always trigger a CI after opening a PR :-)

I usually wait until the first review or so, since the PR likely needs to be updated after it anyway.

cjihrig and maclover7 reacted with laugh emoji
All reactions
  • 😄 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Feb 11, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

New CI: https://ci.nodejs.org/job/node-test-commit/16161/
New CI: https://ci.nodejs.org/job/node-test-commit/16301/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Feb 16, 2018
@BridgeAR
BridgeAR requested a review from mcollina February 17, 2018 13:57
mcollina
mcollina reviewed Feb 17, 2018
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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.

Good work!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/internal/streams/destroy.js Outdated

@mcollina mcollina Feb 17, 2018

Copy link
Copy Markdown
Member

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.

can you add a unit test for those? Maybe also place them in a separate commit, if we want to backport them separately.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@addaleax addaleax Feb 19, 2018

Copy link
Copy Markdown
Member Author

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.

@mcollina Do you know where those tests are? In any case, these lines are tested in the sense that tests do fail without them...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mcollina mcollina Feb 20, 2018

Copy link
Copy Markdown
Member

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.

We need test that can be run as part of readable-stream.

Here are the current tests:

test/parallel/test-stream-duplex-destroy.js
test/parallel/test-stream-readable-destroy.js
test/parallel/test-stream-transform-destroy.js
test/parallel/test-stream-writable-destroy.js

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@BridgeAR BridgeAR removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Feb 18, 2018
addaleax added 3 commits February 20, 2018 21:55
@addaleax
net: use _final instead of on('finish')
0a09c1a
Shutting down the connection is what `_final` is there for.
@addaleax
[squash] nit
845bf1d
@addaleax
[squash] add streams-only test
356ac44
@addaleax
addaleax force-pushed the net-final branch from 461d558 to 356ac44 Compare February 20, 2018 21:02
@addaleax

addaleax commented Feb 20, 2018

Copy link
Copy Markdown
Member Author

@mcollina Thanks for the pointer, done!

CI: https://ci.nodejs.org/job/node-test-commit/16392/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Feb 20, 2018
mcollina
mcollina approved these changes Feb 21, 2018
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@addaleax

addaleax commented Feb 21, 2018

Copy link
Copy Markdown
Member Author

Landed in 906bbef

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax closed this Feb 21, 2018
@addaleax
addaleax deleted the net-final branch February 21, 2018 19:28
@addaleax addaleax removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Feb 21, 2018
@lpinca

lpinca commented Feb 21, 2018

Copy link
Copy Markdown
Member

@addaleax it seems this landed without metadata.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Feb 21, 2018

Copy link
Copy Markdown
Member Author

@lpinca I’ve force-pushed that mistake away, thanks for pointing it out.

lpinca reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax added a commit that referenced this pull request Feb 21, 2018
@addaleax
net: use _final instead of on('finish')
03ddd13
Shutting down the connection is what `_final` is there for.

PR-URL: #18608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
addaleax added a commit to addaleax/node that referenced this pull request Feb 26, 2018
@addaleax
net: use _final instead of on('finish')
ea86656
Shutting down the connection is what `_final` is there for.

PR-URL: nodejs#18608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax addaleax added the backport-requested-v9.x label Feb 26, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request May 1, 2018
@addaleax @BridgeAR
net: use _final instead of on('finish')
a4d4248
Shutting down the connection is what `_final` is there for.

PR-URL: nodejs#18608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@addaleax @MayaLekova
net: use _final instead of on('finish')
1f77b39
Shutting down the connection is what `_final` is there for.

PR-URL: nodejs#18608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@addaleax addaleax added land-on-v8.x and removed backport-requested-v9.x labels Jun 29, 2018
addaleax added a commit that referenced this pull request Jun 29, 2018
@addaleax
net: use _final instead of on('finish')
bf41a41
Shutting down the connection is what `_final` is there for.

PR-URL: #18608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 9, 2018
v8.12.0 proposal #21593
Merged
rvagg pushed a commit that referenced this pull request Aug 16, 2018
@addaleax @rvagg
net: use _final instead of on('finish')
3d38bab
Shutting down the connection is what `_final` is there for.

PR-URL: #18608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@lpinca lpinca lpinca approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

net Issues and PRs related to the net subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@addaleax @BridgeAR @lpinca @mcollina @jasnell @nodejs-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.