1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Removed no longer used mutexes from match server

This commit is contained in:
Ivan Savenko
2024-02-03 17:04:14 +02:00
parent f97ffd8e9a
commit 6eef197cea
10 changed files with 13 additions and 36 deletions

View File

@@ -247,7 +247,6 @@ void CVCMIServer::prepareToRestart()
for(auto c : activeConnections)
c->enterLobbyConnectionMode();
boost::unique_lock<boost::recursive_mutex> queueLock(mx);
gh = nullptr;
}
@@ -407,8 +406,7 @@ bool CVCMIServer::passHost(int toConnectionId)
void CVCMIServer::clientConnected(std::shared_ptr<CConnection> c, std::vector<std::string> & names, const std::string & uuid, EStartMode mode)
{
if(state != EServerState::LOBBY)
throw std::runtime_error("CVCMIServer::clientConnected called while game is not accepting clients!");
assert(state == EServerState::LOBBY);
c->connectionID = currentClientId++;
@@ -945,6 +943,10 @@ ui8 CVCMIServer::getIdOfFirstUnallocatedPlayer() const
if(!si->getPlayersSettings(i->first))
return i->first;
}
return 0;
}
INetworkHandler & CVCMIServer::getNetworkHandler()
{
return *networkHandler;
}