From 8dc19f86c4c9806d98553acbf43cbfdc8f46272c Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:46:27 +1000 Subject: [PATCH] Increase timeout for slower internet on gameserver side --- src/modules/MPModule.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/MPModule.ts b/src/modules/MPModule.ts index 07b4707..126a64c 100644 --- a/src/modules/MPModule.ts +++ b/src/modules/MPModule.ts @@ -144,7 +144,7 @@ export async function requestServerData(client:TClient, server:IServerExt):Promi for (let i = 0; i < maxRetries; i++) { try { - const data = await Undici.fetch(url, {keepalive: true, signal: AbortSignal.timeout(12000), headers: {'User-Agent': `${client.user.username} - MPModule/undici`}}); + const data = await Undici.fetch(url, {keepalive: true, signal: AbortSignal.timeout(22000), headers: {'User-Agent': `${client.user.username} - MPModule/undici`}}); if (data.status === 200 ?? 204) { server.failureCount = 0; delay = 500;