Avoid directly utilizing the disconnect method for GameClient.
This commit is contained in:
@@ -79,11 +79,12 @@ public class GameClient extends NetClient
|
||||
LOGGER_ACCOUNTING.finer("Client disconnected: " + this);
|
||||
LoginServerThread.getInstance().sendLogout(_accountName);
|
||||
_connectionState = ConnectionState.DISCONNECTED;
|
||||
super.onDisconnection();
|
||||
}
|
||||
|
||||
public void closeNow()
|
||||
{
|
||||
disconnect();
|
||||
onDisconnection();
|
||||
|
||||
synchronized (this)
|
||||
{
|
||||
|
@@ -43,7 +43,7 @@ public class PacketHandler implements PacketHandlerInterface<GameClient>
|
||||
{
|
||||
LOGGER.warning("PacketHandler: Problem receiving packet id from " + client);
|
||||
LOGGER.warning(CommonUtil.getStackTrace(e));
|
||||
client.disconnect();
|
||||
client.closeNow();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -40,6 +40,7 @@ public class Logout implements ClientPacket
|
||||
final Player player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
client.closeNow();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user