Index: ps/trunk/source/network/NetClient.cpp =================================================================== --- ps/trunk/source/network/NetClient.cpp +++ ps/trunk/source/network/NetClient.cpp @@ -181,11 +181,11 @@ void CNetClient::DestroyConnection() { - // Send network messages from the current frame before connection is destroyed. + // Attempt to 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. + m_ClientTurnManager->OnDestroyConnection(); + Flush(); } SAFE_DELETE(m_Session); } Index: ps/trunk/source/network/NetClientTurnManager.cpp =================================================================== --- ps/trunk/source/network/NetClientTurnManager.cpp +++ ps/trunk/source/network/NetClientTurnManager.cpp @@ -95,7 +95,10 @@ void CNetClientTurnManager::OnDestroyConnection() { - NotifyFinishedOwnCommands(m_CurrentTurn + COMMAND_DELAY); + // Attempt to flush messages before leaving. + // Notice the sending is not reliable and rarely makes it to the Server. + if (m_NetClient.GetCurrState() == NCS_INGAME) + NotifyFinishedOwnCommands(m_CurrentTurn + COMMAND_DELAY); } void CNetClientTurnManager::OnSimulationMessage(CSimulationMessage* msg)