Always delay before closing a session. Last part of the fix.

This commit is contained in:
lotodore
2007-10-28 13:04:05 +00:00
parent fa7af40a49
commit 92f03db7a2
2 changed files with 6 additions and 11 deletions
+2 -7
View File
@@ -120,9 +120,7 @@ void
ServerLobbyThread::RemoveSessionFromGame(SessionWrapper session) ServerLobbyThread::RemoveSessionFromGame(SessionWrapper session)
{ {
// Just remove the session. Only for fatal errors. // Just remove the session. Only for fatal errors.
m_gameSessionManager.RemoveSession(session.sessionData->GetId()); CloseSessionDelayed(session);
// Update stats (if needed).
BroadcastStatisticsUpdate();
} }
void void
@@ -312,10 +310,7 @@ ServerLobbyThread::ProcessLoop()
} catch (const NetException &) } catch (const NetException &)
{ {
// On error: Close this session. // On error: Close this session.
m_initTimerSessionMap.erase(session.sessionData->GetId()); CloseSessionDelayed(session);
m_sessionManager.RemoveSession(session.sessionData->GetId());
// Update stats (if needed).
BroadcastStatisticsUpdate();
return; return;
} }
if (packet.get()) if (packet.get())