Skip to content

Commit

Permalink
fix: Race condition server swap
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Mar 29, 2024
1 parent 9df5ada commit b4ed167
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/back/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ export function registerRequestCallbacks(state: BackState, init: () => Promise<v
...process.env,
'PATH': state.pathVar ?? process.env.PATH,
}}, configServer);
await promiseSleep(1500);
}
}
// If it has GameData, make sure it's present
Expand Down Expand Up @@ -2720,6 +2721,7 @@ function changeServerFactory(state: BackState): (server?: string) => Promise<voi
...process.env,
'PATH': state.pathVar ?? process.env.PATH,
}}, serverInfo);
await promiseSleep(1500);
}
} else {
throw new Error(`Server '${server}' not found`);
Expand Down

0 comments on commit b4ed167

Please sign in to comment.