fix: use the last used port instead of the globally defined port

This commit is contained in:
Eric 2025-02-03 16:36:49 +11:00
parent 9f83213757
commit 055744a0c7
No known key found for this signature in database

View File

@ -155,8 +155,8 @@ template multinodesuite*(name: string, body: untyped) =
let updatedLogFile = getLogFile(role, some roleIdx)
config.withLogFile(updatedLogFile)
let apiPort = await nextFreePort(CodexApiPort + nodeIdx)
let discPort = await nextFreePort(CodexDiscPort + nodeIdx)
let apiPort = await nextFreePort(lastUsedCodexApiPort + nodeIdx)
let discPort = await nextFreePort(lastUsedCodexDiscPort + nodeIdx)
config.addCliOption("--api-port", $apiPort)
config.addCliOption("--disc-port", $discPort)
lastUsedCodexApiPort = apiPort