mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-03 17:21:01 +00:00
bugfix: actually return 404 when game not found
This commit is contained in:
@@ -172,9 +172,12 @@ async function fetchLobbies(): Promise<number> {
|
||||
const fetchPromises = [];
|
||||
|
||||
for (const gameID of publicLobbyIDs) {
|
||||
const controller = new AbortController();
|
||||
setTimeout(() => controller.abort(), 5000); // 5 second timeout
|
||||
const port = config.workerPort(gameID);
|
||||
const promise = fetch(`http://localhost:${port}/api/game/${gameID}`, {
|
||||
headers: { [config.adminHeader()]: config.adminToken() },
|
||||
signal: controller.signal,
|
||||
})
|
||||
.then((resp) => resp.json())
|
||||
.then((json) => {
|
||||
|
||||
Reference in New Issue
Block a user