Fixed decreasing number of players when players leave.

This commit is contained in:
lotodore
2007-10-20 23:24:40 +00:00
parent 64ba7c0994
commit d5453e5416
+7
View File
@@ -113,6 +113,8 @@ ServerLobbyThread::RemoveSessionFromGame(SessionWrapper session)
{
// Just remove the session. Only for fatal errors.
m_gameSessionManager.RemoveSession(session.sessionData->GetSocket());
// Update stats (if needed).
BroadcastStatisticsUpdate();
}
void
@@ -126,6 +128,9 @@ ServerLobbyThread::CloseSessionDelayed(SessionWrapper session)
boost::mutex::scoped_lock lock(m_closeSessionListMutex);
m_closeSessionList.push_back(closeSessionData);
// Update stats (if needed).
BroadcastStatisticsUpdate();
}
void
@@ -311,6 +316,8 @@ ServerLobbyThread::ProcessLoop()
{
// On error: Close this session.
m_sessionManager.RemoveSession(session.sessionData->GetSocket());
// Update stats (if needed).
BroadcastStatisticsUpdate();
return;
}
if (packet.get())