Revert "server: revert port contention change"

This reverts commit 57439634e5.
This commit is contained in:
Koushik Dutta
2024-08-27 08:58:22 -07:00
parent 4794a6dbf3
commit e94cea0236

View File

@@ -32,7 +32,9 @@ export class NodeForkWorker extends ChildProcessWorker {
const { env, pluginDebug } = options;
const execArgv: string[] = process.execArgv.slice();
// execArgv will contain the inspect port when debugging the main plugin process.
// remove that argument to prevent a plugin fork from trying to listen on that port again.
const execArgv: string[] = process.execArgv.slice().filter(arg => !arg.startsWith('--inspect='));
if (pluginDebug) {
execArgv.push(`--inspect=0.0.0.0:${pluginDebug.inspectPort}`);
}