mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-27 03:32:55 +00:00
fix(server): retire the compiler worker after build errors
A failed parallel target can leave the other target compiling. Await worker termination before the next queued request instead of reusing an isolate with unfinished build work.
This commit is contained in:
@@ -113,6 +113,9 @@ class PluginCompiler {
|
||||
const error = reply.issues ? new ZodError(reply.issues) : reply.error;
|
||||
if (reply.errors) Object.assign(error, { errors: reply.errors });
|
||||
if (reply.warnings) Object.assign(error, { warnings: reply.warnings });
|
||||
// Promise.all can reject while the other target is still compiling.
|
||||
// Retire the isolate before another request can enter it.
|
||||
this.stopWorker(worker);
|
||||
reject(error);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user