FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: cleanup pipeline destroyer by ronag · Pull Request #32690 · nodejs/node · GitHub

/ node Public

stream: cleanup pipeline destroyer - #32690

Closed
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:pipeline-cleanup
Closed

stream: cleanup pipeline destroyer#32690
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:pipeline-cleanup

Conversation

ronag commented Apr 6, 2020

Copy link
Copy Markdown
Member

Slightly cleans up the destroyer logic. Make readable and writable use similar logic.

i.e.

    if (!err && reading && !writing && stream.writable) {
      return callback();
    }

    if (!err && !reading && writing && stream.readable) {
      return callback();
    }
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

Slightly cleans up the destroyer logic.
ronag added the stream Issues and PRs related to the stream subsystem. label Apr 6, 2020

Copy link
Copy Markdown
Collaborator

destroyImpl.destroyer(stream, err);
if (!err && !reading && writing && stream.readable) {
return callback();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe merge writable and readable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

not sure I follow?

Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented Apr 13, 2020
edited by ronag
Loading

Copy link
Copy Markdown
Collaborator

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

ronag added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Apr 20, 2020

if (err || !final || !stream.readable) {
destroyImpl.destroyer(stream, err);
if (!err && !reading && writing && stream.readable) {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
if (!err) {
  if (reading) {
    if (!writing && stream.writable) {
      return callback();
    }
  } else if (writing && stream.readable) {
    return callback();
  }
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I suppose this is a nit?

ronag added blocked PRs that are blocked by other issues or PRs. and removed author ready PRs that have at least one approval, no outstanding review comments, and a CI started. labels Apr 21, 2020

ronag commented Apr 21, 2020

Copy link
Copy Markdown
Member Author

This might be redundant given #32966

ronag commented Apr 21, 2020

Copy link
Copy Markdown
Member Author

closed in favor of #32968

ronag closed this Apr 21, 2020
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

Labels

blocked PRs that are blocked by other issues or PRs. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL