-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "stream: revert fix cloned webstreams not being unref'd"
This reverts commit 8d20b64.
- Loading branch information
1 parent
07c45ba
commit 0600cf1
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const { ok } = require('node:assert'); | ||
|
||
// This test verifies that cloned ReadableStream and WritableStream instances | ||
// do not keep the process alive. The test fails if it timesout (it should just | ||
// exit immediately) | ||
|
||
const rs1 = new ReadableStream(); | ||
const ws1 = new WritableStream(); | ||
|
||
const [rs2, ws2] = structuredClone([rs1, ws1], { transfer: [rs1, ws1] }); | ||
|
||
ok(rs2 instanceof ReadableStream); | ||
ok(ws2 instanceof WritableStream); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters