fix/player-list not responding on failed request

This commit is contained in:
SowinskiBraeden committed 2025-01-11 15:49:56 -08:00
1 parent cd2ae35a1f
commit 265f0d3f38
3 files changed
+9 -7

No files matched your search

+1
View File
@@ -176,6 +176,7 @@ module.exports = {
if (!res.ok) {
client.error(`Failed to get Nitrado server stats (${nitrado_cred.ServerID}): status: ${res.status}, message: ${res.statusText}: ${fetcher} via FetchServerSettings`);
if (res.status == 401) return 1; // return immediately if unauthorized
if (retries === 2) return 1; // Return error status on the second failed status code.
} else {
const data = await res.json();