From 230ae6bd164eeed8ade3fa247fb2f52bc1a5e9f6 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Mon, 31 Jul 2023 17:11:57 -0700 Subject: [PATCH] Fix reporting of secondaryPort and tertiaryPort See: #2039 --- service/OneService.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index ead7a834..5b462156 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1056,7 +1056,7 @@ public: if (_secondaryPort) { _ports[1] = _secondaryPort; } else { - _ports[1] = _getRandomPort(); + _ports[1] = _secondaryPort = _getRandomPort(); } } #ifdef ZT_USE_MINIUPNPC @@ -1067,7 +1067,7 @@ public: if (_tertiaryPort) { _ports[2] = _tertiaryPort; } else { - _ports[2] = _getRandomPort(); + _ports[2] = _tertiaryPort = _getRandomPort(); } if (_ports[2]) {