mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-26 11:45:37 -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++) {
|
for (let i = 0; i < maxRetries; i++) {
|
||||||
try {
|
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) {
|
if (data.status === 200 ?? 204) {
|
||||||
server.failureCount = 0;
|
server.failureCount = 0;
|
||||||
delay = 500;
|
delay = 500;
|
||||||
|
Loading…
Reference in New Issue
Block a user