From a14e015354611a50920a0861f80c9691ab8fa633 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 25 Feb 2012 23:48:28 +0000 Subject: Extended SocketThreads for writing support (unusable in cClientHandle due to too many deadlock possibilities) Extended the range of ignored packets in pre-game client states (fixes connection issues with some mods installed) git-svn-id: http://mc-server.googlecode.com/svn/trunk@327 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cClientHandle.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source/cClientHandle.cpp') diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 78032611e..9eed31a3a 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -151,7 +151,7 @@ cClientHandle::~cClientHandle() { LOG("Deleting client \"%s\"", GetUsername().c_str()); - // Remove from cSocketThreads, just in case + // Remove from cSocketThreads, we're not to be called anymore: cRoot::Get()->GetServer()->ClientDestroying(this); m_LoadedChunks.clear(); @@ -225,14 +225,6 @@ void cClientHandle::Destroy() { RemoveFromAllChunks(); } - - if (m_Socket.IsValid()) - { - m_Socket.CloseSocket(); - } - - // Synchronize with the cSocketThreads (so that they don't call us anymore) - cRoot::Get()->GetServer()->ClientDestroying(this); } @@ -489,6 +481,7 @@ void cClientHandle::HandlePacket(cPacket * a_Packet) // Ignored packets: case E_PLAYERLOOK: + case E_CHAT: case E_PLAYERMOVELOOK: case E_PLAYERPOS: case E_KEEP_ALIVE: break; @@ -504,6 +497,8 @@ void cClientHandle::HandlePacket(cPacket * a_Packet) { // Ignored packets: case E_KEEP_ALIVE: + case E_CHAT: + case E_FLYING: case E_PLAYERLOOK: case E_PLAYERMOVELOOK: case E_PLAYERPOS: break; @@ -520,6 +515,8 @@ void cClientHandle::HandlePacket(cPacket * a_Packet) { // Ignored packets: case E_KEEP_ALIVE: + case E_CHAT: + case E_FLYING: case E_PLAYERLOOK: case E_PLAYERMOVELOOK: case E_PLAYERPOS: break; @@ -535,6 +532,8 @@ void cClientHandle::HandlePacket(cPacket * a_Packet) { // Ignored packets: case E_KEEP_ALIVE: + case E_CHAT: + case E_FLYING: case E_PLAYERLOOK: case E_PLAYERPOS: break; -- cgit v1.2.3