Skip to content

streams: fix cloned webstreams not being unref'd

When cloning a ReadableStream and WritableStream, both use an internal MessageChannel to communicate with the original stream. Those, however, previously were not unref'd which would lead to the process not exiting if the stream was not fully consumed.

Alternative for: https://github.com/nodejs/node/pull/51131

Fixes: https://github.com/nodejs/node/issues/44985

Semver-major because this can change whether a worker thread stays alive solely because of the existence of the cloned streams vs. needing something else to keep it alive (see the modified test in this PR for instance).

Merge request reports

Loading