Always delay before closing a session. Last part of the fix.
This commit is contained in:
@@ -40,10 +40,10 @@ public:
|
|||||||
GameSenderCallback(ServerGameThread &server) : m_server(server) {}
|
GameSenderCallback(ServerGameThread &server) : m_server(server) {}
|
||||||
virtual ~GameSenderCallback() {}
|
virtual ~GameSenderCallback() {}
|
||||||
|
|
||||||
virtual bool GetSocketForSession(SessionId session, SOCKET &outSocket)
|
virtual bool GetSocketForSession(SessionId session, SOCKET &outSocket)
|
||||||
{
|
{
|
||||||
return m_server.GetSessionManager().GetSocketForSession(session, outSocket);
|
return m_server.GetSessionManager().GetSocketForSession(session, outSocket);
|
||||||
}
|
}
|
||||||
virtual void SignalNetError(SessionId /*session*/, int /*errorID*/, int /*osErrorID*/)
|
virtual void SignalNetError(SessionId /*session*/, int /*errorID*/, int /*osErrorID*/)
|
||||||
{
|
{
|
||||||
// We just ignore send errors for now, on server side.
|
// We just ignore send errors for now, on server side.
|
||||||
|
|||||||
@@ -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())
|
||||||
|
|||||||
Reference in New Issue
Block a user