diff --git a/packages/nx/src/project-graph/plugins/isolation/plugin-pool.ts b/packages/nx/src/project-graph/plugins/isolation/plugin-pool.ts index 5f076c8ab920c..a34c8f6dc6ae9 100644 --- a/packages/nx/src/project-graph/plugins/isolation/plugin-pool.ts +++ b/packages/nx/src/project-graph/plugins/isolation/plugin-pool.ts @@ -61,7 +61,7 @@ export function loadRemoteNxPlugin( const cleanupFunction = () => { worker.off('exit', exitHandler); - shutdownPluginWorker(worker, pendingPromises); + shutdownPluginWorker(worker); }; cleanupFunctions.add(cleanupFunction); @@ -75,21 +75,12 @@ export function loadRemoteNxPlugin( }); } -async function shutdownPluginWorker( - worker: ChildProcess, - pendingPromises: Map -) { +function shutdownPluginWorker(worker: ChildProcess) { // Clears the plugin cache so no refs to the workers are held nxPluginCache.clear(); // logger.verbose(`[plugin-pool] starting worker shutdown`); - // Other things may be interacting with the worker. - // Wait for all pending promises to be done before killing the worker - await Promise.all( - Array.from(pendingPromises.values()).map(({ promise }) => promise) - ); - worker.kill('SIGINT'); }