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

cloning byte readablestream causes process to hang #51944

Closed
KhafraDev opened this issue Mar 2, 2024 · 2 comments
Closed

cloning byte readablestream causes process to hang #51944

KhafraDev opened this issue Mar 2, 2024 · 2 comments

Comments

@KhafraDev
Copy link
Member

Version

v21.6.2

Platform

n/a

Subsystem

webstreams

What steps will reproduce the bug?

function cloneBody (body) {
  const [out1, out2] = body.stream.tee()
  const out2Clone = structuredClone(out2, { transfer: [out2] })
}

const rs = new ReadableStream({
  pull (controller) {
    controller.byobRequest?.respond(0)
  },
  type: 'bytes'
})

cloneBody({ stream: rs })

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

the process to close automatically

What do you see instead?

the process hangs

Additional information

this is needed for fetch.

@tsctx
Copy link
Member

tsctx commented Mar 2, 2024

@KhafraDev
I believe this was fixed in the #51526 patch.
I have tested with a nightly build and this bug is not present.

@KhafraDev
Copy link
Member Author

ngl I thought that already made it into 21.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants