Skip to content

pipeTo with preventCancel: true never settle if readable doesn't produce new chunks #118

Closed
@yume-chan

Description

Repro

const readable = new ReadableStream();
const abortController = new AbortController();

readable.pipeTo(new WritableStream(), {
    preventCancel: true,
    signal: abortController.signal,
}).then(() => {
    console.log('resolve');
}, () => {
    console.log('rejected');
});

setTimeout(() => {
    console.log('abort');
    abortController.abort();
}, 1000);

setTimeout(() => {
    console.log('exit');
}, 10000);

Expected

Microsoft Edge canary 103.0.1255.0, with native ReadableStream and WritableStream

abort
rejected
exit

Node.js v16.13.1, with stream/web

(node:14660) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
abort
rejected
exit

Actual

web-streams-polyfill: 4.0.0-beta.2

abort
exit

Metadata

Assignees

No one assigned

    Labels

    bugdomain: complianceIssues related to compliance with the streams standard

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions