-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.web streams
Description
Version
17.4.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
import { ReadableStream } from 'node:stream/web';
import { setTimeout, setInterval } from 'node:timers/promises';
const input = new ReadableStream(
{ // underlyingSource
start( controller ) { },
async pull( controller ) {
await setInterval( 1000 );
const chunk = performance.now();
console.log( 'INPUT_READ_PULL', chunk );
controller.enqueue( chunk );
},
cancel( reason ) { },
type: undefined,
autoAllocateChunkSize: undefined,
},
{ // strategy
highWaterMark: undefined,
size: undefined,
},
);
const input_reader = input.getReader( {
'mode': undefined,
} );
input_reader.closed.then( () => {
console.log( 'INPUT_READ__CLOSE' );
} );
//await setTimeout( 2000 );
input_reader.releaseLock();
How often does it reproduce? Is there a required condition?
input_reader.closed.then( () => {} );
What is the expected behavior?
No response
What do you see instead?
TypeError [ERR_INVALID_STATE]: Invalid state: Reader released
Additional information
No response
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.web streams