1
0
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:
JoshuaJB
2014-02-05 02:44:25 +00:00
parent 035078c317
commit fa85527baf
4 changed files with 17 additions and 1 deletions
+6
View File
@@ -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);
}