Commit c45313b3 authored by Anna Henningsen's avatar Anna Henningsen Committed by James M Snell
Browse files

worker: perform initial port.unref() before preload modules

The refcount of the internal communication port is relevant for
stdio, but the `port.unref()` call effectively resets any `.ref()`
calls happening during stdio operations happening before it.

Therefore, do the `.unref()` call before loading preload modules,
which may cause stdio operations.

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

PR-URL: https://github.com/nodejs/node/pull/33455


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarJuan José Arboleda <soyjuanarbol@gmail.com>
parent b6b82cba
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment