fix: wrong port attempts order

This commit is contained in:
CosminPerRam 2024-01-11 02:48:57 +02:00
parent 184e9b170c
commit 60aae7396f
1 changed files with 4 additions and 2 deletions

View File

@ -45,13 +45,13 @@ export default class QueryRunner {
}
if (userOptions.port) {
attempts.push(optionsCollection)
if (!userOptions.givenPortOnly) {
if (gameQueryPortOffset) { addAttemptWithPort(userOptions.port + gameQueryPortOffset) }
if (userOptions.port === gameOptions.port && gameQueryPort) { addAttemptWithPort(gameQueryPort) }
}
attempts.push(optionsCollection)
} else if (gameQueryPort) {
addAttemptWithPort(gameQueryPort)
} else if (gameOptions.port) {
@ -66,7 +66,9 @@ export default class QueryRunner {
let attemptNum = 0
const errors = []
for (const attempt of attempts) {
console.log(attempt)
for (let retry = 0; retry < numRetries; retry++) {
console.log(retry)
attemptNum++
try {