Skip to content

fix: Only abort pipeablestream if not already closed #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented Feb 7, 2025

Remix/React-Router seems to always call abort() after a short timeout. This reports the following "error":

Error: The render was aborted by the server without a reason.
    at Timeout.abort [as _onTimeout] (file:///home/ryun/Projects/tmp-react-router-preact/node_modules/preact-render-to-string/src/stream-node.js:75:4)
    at listOnTimeout (node:internal/timers:594:17)
    at processTimers (node:internal/timers:529:7)

To my understanding, this is something we can ignore if the stream has already been closed. React does something along these lines too, checking to ensure there's tasks that can be aborted before throwing and cleaning up further.

cc @sbesh91

Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: cdfae86

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-render-to-string Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

LGTM

@JoviDeCroock JoviDeCroock merged commit 441dea2 into main Feb 7, 2025
1 check passed
@JoviDeCroock JoviDeCroock deleted the fix/pipeable-abort branch February 7, 2025 07:19
@github-actions github-actions bot mentioned this pull request Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants