Bring discord protocol up to date with gamedig 3.0

This commit is contained in:
Michael Morrison 2021-05-18 22:33:36 -05:00
parent d9310db38b
commit fe124a4487
6 changed files with 43 additions and 29 deletions

View file

@ -66,7 +66,12 @@ class QueryRunner {
port: gameOptions.port + (gameQueryPortOffset || 0)
});
} else {
throw new Error("Could not determine port to query. Did you provide a port or gameid?");
// Hopefully the request doesn't need a port. If it does, it'll fail when making the request.
attempts.push({
...defaultOptions,
...gameOptions,
...userOptions
});
}
const numRetries = userOptions.maxAttempts || gameOptions.maxAttempts || defaultOptions.maxAttempts;