fix(gateway): refine process termination and wait logic on retry (#750)

This commit is contained in:
paisley
2026-04-02 16:45:23 +08:00
committed by GitHub
Unverified
parent 560ae95611
commit 28508bc643
3 changed files with 14 additions and 5 deletions

View File

@@ -137,7 +137,7 @@ export async function waitForPortFree(port: number, timeoutMs = 30000, signal?:
while (Date.now() - start < timeoutMs) {
if (signal?.aborted) {
logger.debug(`waitForPortFree: aborted while waiting for port ${port}`);
return;
throw new Error(`waitForPortFree: aborted while waiting for port ${port}`);
}
const available = await new Promise<boolean>((resolve) => {