Fix crash due to passing args

This commit is contained in:
nordsoft
2022-11-15 22:09:46 +04:00
parent cfe1867d4a
commit 694fedc662
4 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ void CVCMIServer::establishRemoteConnections()
int port = cmdLineOptions["lobby-port"].as<ui16>();
logGlobal->info("Server is connecting to remote at %s:%d with uuid %d times", address, port, uuid, numOfConnections);
for(int i = 0; i < numOfConnections; ++i)
for(int i = 0; i < numOfConnections && i == remotePipeConnections; ++i, ++remotePipeConnections)
connectToRemote(address, port);
}
+1
View File
@@ -53,6 +53,7 @@ class CVCMIServer : public LobbyInfo
boost::recursive_mutex mx;
std::shared_ptr<CApplier<CBaseForServerApply>> applier;
std::unique_ptr<boost::thread> announceLobbyThread, remoteConnectionsThread;
int remotePipeConnections = 0;
public:
std::shared_ptr<CGameHandler> gh;