mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-25 23:15:38 -05:00
Increase timeout for slower internet on gameserver side
This commit is contained in:
parent
981b4c66eb
commit
8dc19f86c4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user