From 2d2220f38f2fe569bac881c11470ed3f7d852fa8 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 16 Oct 2010 19:09:38 +1300 Subject: [PATCH] issue a warning on the debug, rather than exploding on double-quit --- OpenRA.Game/Network/FrameData.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenRA.Game/Network/FrameData.cs b/OpenRA.Game/Network/FrameData.cs index 62d728cb48..40b8e386ab 100755 --- a/OpenRA.Game/Network/FrameData.cs +++ b/OpenRA.Game/Network/FrameData.cs @@ -25,6 +25,13 @@ namespace OpenRA.Network public void ClientQuit( int clientId, int lastClientFrame ) { + if (clientQuitTimes.ContainsKey(clientId)) + { + Game.Debug("Warning: double-quit from client {0}, frames {1},{2}", + clientId, clientQuitTimes[clientId], lastClientFrame); + return; + } + clientQuitTimes.Add( clientId, lastClientFrame ); }