fix: ignore cached ports when givenPortOnly is set (#710)

closes #709
This commit is contained in:
cetteup 2025-06-09 15:53:45 +02:00 committed by GitHub
parent da78c84c03
commit a2835108d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View file

@ -56,7 +56,8 @@ export default class QueryRunner {
const cachedPort = this.portCache[`${userOptions.address}:${userOptions.port}`]
if (cachedPort && optionsCollection.portCache) {
// Use any cached port if port caching is enabled and user is not explicitly enforcing their given port
if (cachedPort && optionsCollection.portCache && !userOptions.givenPortOnly) {
addAttemptWithPort(cachedPort)
}