Skip to content

Commit

Permalink
addendum ad00fbc
Browse files Browse the repository at this point in the history
add backward compability with old clients,
so 98 clients connecting to 100 get a msgbox, too
  • Loading branch information
jK committed Jul 4, 2015
1 parent f9256eb commit f4d0d97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/Net/GameServer.cpp
Expand Up @@ -1754,6 +1754,7 @@ void CGameServer::HandleConnectionAttempts()
const std::string msg = str(format(ConnectionReject) %ex.what());
prev->Unmute();
prev->SendData(CBaseNetProtocol::Get().SendRejectConnect(msg));
prev->SendData(CBaseNetProtocol::Get().SendQuit(msg)); //FIXME backward compatibility (remove ~2017)
prev->Flush(true);
Message(msg);
UDPNet->RejectConnection();
Expand Down Expand Up @@ -1892,7 +1893,7 @@ void CGameServer::GenerateAndSendGameID()
#endif
if (generatedGameID)
for (int i = 0; i<16; ++i)
gameID.charArray[i] = p[i];
gameID.charArray[i] = p[i];
}

Broadcast(CBaseNetProtocol::Get().SendGameID(gameID.charArray));
Expand Down Expand Up @@ -2420,7 +2421,6 @@ void CGameServer::UpdateLoop()
Threading::SetThreadName("netcode");
Threading::SetAffinity(~0);

//FIXME use async callback funcs in boost udp sockets and so get rid of any latency & remove netcode thread
while (!quitServer) {
spring_sleep(spring_msecs(5));

Expand Down

0 comments on commit f4d0d97

Please sign in to comment.