Skip to content

Commit c437659

Browse files
authored
Merge pull request #396 from charlzyx/main
fix(core): findPort maximum call stack #395
2 parents 8ba9295 + 758ee0c commit c437659

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/core/src/shared/record-cache.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ export const findPort = async (record: RecordInfo): Promise<number> => {
4545
if (content[process.cwd()].port) {
4646
return content[process.cwd()].port;
4747
}
48-
return new Promise(async (resolve) => {
49-
const port = await findPort(record);
50-
resolve(port);
48+
return new Promise((resolve) => {
49+
setTimeout(async () => {
50+
const port = await findPort(record);
51+
resolve(port);
52+
});
5153
});
5254
};

0 commit comments

Comments
 (0)