浏览代码

Fix reporting of secondaryPort and tertiaryPort See: #2039

Joseph Henry 2 年之前
父节点
当前提交
230ae6bd16
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      service/OneService.cpp

+ 2 - 2
service/OneService.cpp

@@ -1056,7 +1056,7 @@ public:
 				if (_secondaryPort) {
 				if (_secondaryPort) {
 					_ports[1] = _secondaryPort;
 					_ports[1] = _secondaryPort;
 				} else {
 				} else {
-					_ports[1] = _getRandomPort();
+					_ports[1] = _secondaryPort = _getRandomPort();
 				}
 				}
 			}
 			}
 #ifdef ZT_USE_MINIUPNPC
 #ifdef ZT_USE_MINIUPNPC
@@ -1067,7 +1067,7 @@ public:
 				if (_tertiaryPort) {
 				if (_tertiaryPort) {
 					_ports[2] = _tertiaryPort;
 					_ports[2] = _tertiaryPort;
 				} else {
 				} else {
-					_ports[2] = _getRandomPort();
+					_ports[2] = _tertiaryPort = _getRandomPort();
 				}
 				}
 
 
 				if (_ports[2]) {
 				if (_ports[2]) {