Re: [whatwg/streams] Should `ReadableStreamClose(stream)` also close pending read requests in case of ReadableStreamBYOBReader (Issue #1294)

Yes, this is hard to understand. For a while I thought it was a bug, and then I remembered we did it this way so that the buffer can be returned to the user. I think [example 10.5](https://streams.spec.whatwg.org/#example-rbs-pull) does it correctly. You need to call `controller.byobRequest.respond(0)` after `controller.close()`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1294#issuecomment-1724853982
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1294/1724853982@github.com>

Received on Tuesday, 19 September 2023 05:30:11 UTC