fix: worker.kill should do less

This commit is contained in:
cha0s 2024-02-11 22:37:14 -06:00
parent 64a895d6b6
commit cf0b780182

View File

@ -30,7 +30,10 @@ class StartServerPlugin {
compiler.hooks.afterEmit.tapPromise(pluginName, async (compilation) => {
if (this.worker && this.worker.isConnected()) {
if (signal) {
this.worker.kill(true === signal ? 'SIGUSR2' : signal);
process.kill(
this.worker.process.pid,
true === signal ? 'SIGUSR2' : signal,
);
return undefined;
}
const promise = new Promise((resolve) => {