From 69dc9b4c9aea58ebd95e2dbd0205701dfc4ce54e Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 20 Aug 2013 22:27:29 +0200 Subject: Added a delay between the kick packet and socket close. This should have helped #31, but the client disagrees. --- source/ClientHandle.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/ClientHandle.h') diff --git a/source/ClientHandle.h b/source/ClientHandle.h index c85257df1..62616ba08 100644 --- a/source/ClientHandle.h +++ b/source/ClientHandle.h @@ -254,6 +254,9 @@ private: int m_LastDigBlockX; int m_LastDigBlockY; int m_LastDigBlockZ; + + /// Used while csDestroyedWaiting for counting the ticks until the connection is closed + int m_TicksSinceDestruction; enum eState { @@ -264,6 +267,7 @@ private: csConfirmingPos, ///< The client has been sent the position packet, waiting for them to repeat the position back csPlaying, ///< Normal gameplay csDestroying, ///< The client is being destroyed, don't queue any more packets / don't add to chunks + csDestroyedWaiting, ///< The client has been destroyed, but is still kept so that the Kick packet is delivered (#31) csDestroyed, ///< The client has been destroyed, the destructor is to be called from the owner thread // TODO: Add Kicking here as well -- cgit v1.2.3