forked from mirrors/0ad
Send messages in queue before closing connection, patch by boeseRaupe. Fixes #2420
This was SVN commit r14732.
This commit is contained in:
@@ -144,6 +144,12 @@ void CNetClient::SetAndOwnSession(CNetClientSession* session)
|
||||
|
||||
void CNetClient::DestroyConnection()
|
||||
{
|
||||
// Send network messages from the current frame before connection is destroyed.
|
||||
if (m_ClientTurnManager)
|
||||
{
|
||||
m_ClientTurnManager->OnDestroyConnection(); // End sending of commands for scheduled turn.
|
||||
Flush(); // Make sure the messages are sent.
|
||||
}
|
||||
SAFE_DELETE(m_Session);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user