I may have encountered a bug in ServerFSM::HandleNonLobbyDisconnection(). When an AI player is eliminated, the freeoriond process exits and the GUI client hangs at "downloading new state", after these console messages:
Code: Select all
HumanClientApp::HandleMessage(TURN_PROGRESS)
HumanClientApp::HandleMessage(PLAYER_ELIMINATED)
Code: Select all
void ServerFSM::HandleNonLobbyDisconnection(const Disconnection& d)
{
//....
//....
if (m_server.m_networking.empty() || m_server.m_ai_clients.size() == m_server.m_networking.NumPlayers()) {
Logger().debugStream() << "ServerFSM::HandleNonLobbyDisconnection : All human players disconnected; server terminating.";
Sleep(2000); // HACK! Pause for a bit to let the player disconnected and end game messages propogate.
m_server.Exit(1);
}
}
A more robust check might be to count the number of non-AI players still connected (is that possible?). There's a similar check in MPLobby::react(). Also, a more visible error message would be nice for this exit condition (errorStream instead of debugStream?).
For now I just #ifdef-out the check above and the game runs fine.
Best, Karl