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

stream: don't push null from closed promise #42694 by davedoesdev · Pull Request #45026 · nodejs/node · GitHub

/ node Public

stream: don't push null from closed promise #42694 - #45026

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
davedoesdev:fix-readable-from-web-data-after-eof
Oct 22, 2022
Merged

stream: don't push null from closed promise #42694#45026
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
davedoesdev:fix-readable-from-web-data-after-eof

Conversation

davedoesdev commented Oct 16, 2022
edited by RaisinTen
Loading

Copy link
Copy Markdown
Contributor

closed promise is subscribed to first so will be
resolved first, before any read promise.

This causes data after EOF error to be thrown.

Remove the push null from the closed promise handler. The push null gets done from the read handler
when it detects done.

Fixes: #42694

nodejs-github-bot added needs-ci PRs that need a full CI run. web streams labels Oct 16, 2022

Copy link
Copy Markdown
Contributor Author

Fixes #42694

Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2022

Copy link
Copy Markdown
Collaborator

daeyeon 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

Nit: Adding a test for stream.Duplex would be better since it's also fixed.

closed promise is subscribed to first so will be
resolved first, before any read promise.

This causes data after EOF error to be thrown.

Remove the push null from the closed promise handler.
The push null gets done from the read handler
when it detects done.
daeyeon added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 19, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 19, 2022

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

daeyeon added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 22, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 22, 2022
nodejs-github-bot merged commit 538d8ce into nodejs:main Oct 22, 2022

Copy link
Copy Markdown
Collaborator

Landed in 538d8ce

RafaelGSS pushed a commit that referenced this pull request Nov 1, 2022
closed promise is subscribed to first so will be
resolved first, before any read promise.

This causes data after EOF error to be thrown.

Remove the push null from the closed promise handler.
The push null gets done from the read handler
when it detects done.

PR-URL: #45026
Fixes: #42694
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS mentioned this pull request Nov 1, 2022
RafaelGSS pushed a commit that referenced this pull request Nov 10, 2022
closed promise is subscribed to first so will be
resolved first, before any read promise.

This causes data after EOF error to be thrown.

Remove the push null from the closed promise handler.
The push null gets done from the read handler
when it detects done.

PR-URL: #45026
Fixes: #42694
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

Copy link
Copy Markdown

Sorry to interrupt. Will this PR get backported to node 18? I am currently getting hit by this bug.

danielleadams pushed a commit that referenced this pull request Dec 30, 2022
closed promise is subscribed to first so will be
resolved first, before any read promise.

This causes data after EOF error to be thrown.

Remove the push null from the closed promise handler.
The push null gets done from the read handler
when it detects done.

PR-URL: #45026
Fixes: #42694
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
closed promise is subscribed to first so will be
resolved first, before any read promise.

This causes data after EOF error to be thrown.

Remove the push null from the closed promise handler.
The push null gets done from the read handler
when it detects done.

PR-URL: #45026
Fixes: #42694
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. needs-ci PRs that need a full CI run. web streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'stream.push() after EOF' error when using Readable.fromWeb

9 participants


Back | FazBrowse Home | New Git URL