Skip to content

Commit 00c40c5

Browse files
committed
Don't check gameserver status on every place page load
1 parent cb76a6e commit 00c40c5

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

Site/src/routes/(main)/place/[id=asset]/[name]/+page.server.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,11 @@ export async function load({ locals, params, url }) {
6666
if (!couldMatch(place.name, params.name))
6767
redirect(302, `/place/${id}/${slug}`)
6868

69-
const dedicatedProps: { dedicatedOnline?: boolean } = {}
70-
71-
const hosting = config.Gameservers.Hosting
72-
if (hosting === "Dedicated hosting" || hosting === "Both") {
73-
const status = await getGameserver(id)
74-
dedicatedProps.dedicatedOnline = status.ok
75-
}
69+
// don't check gameserver status here or your mercury will slow to a crawl
7670

7771
return {
7872
scheme: config.LauncherURI,
79-
hosting,
80-
...dedicatedProps,
73+
hosting: config.Gameservers.Hosting,
8174
slug,
8275
place,
8376
thumbnails: [id % thumbnails.length],

0 commit comments

Comments
 (0)