Skip to content
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

fix: 🐛 abort should be after request body has consumer #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kayac-chang
Copy link

@kayac-chang kayac-chang commented Apr 21, 2023

PR is related to: remix-run/remix#3971

The original issue can reproduce by the following examples:

Currently, in unit test,
the controller abort the request before it actually fired,
the request.body is not be consume by reader yet.

After the defer, the test is failed with the following message.

     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "do
ne()" is called; if returning a Promise, ensure it resolves. (/Users/kayac/Pr
ojects/web-std-io/packages/fetch/test/main.js)
      at listOnTimeout (node:internal/timers:559:17)
      at processTimers (node:internal/timers:502:7)

I didn't have an answer to solve it, and I'm try to list down the questions for everyone input

  1. I don't know which body we using currently,
    Is it come from node global api or web-streams-polyfill ?
  2. Why body stream don't cancel even we try to abort it?

@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2023

⚠️ No Changeset found

Latest commit: ddb6418

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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.

1 participant