1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 00:10:58 -04:00

Increase timeout for slower internet on gameserver side

This commit is contained in:
toast-ts 2024-06-20 10:46:27 +10:00
parent 981b4c66eb
commit 8dc19f86c4

View File

@ -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;