Avoid directly utilizing the disconnect method for GameClient.
This commit is contained in:
		| @@ -97,11 +97,12 @@ public class GameClient extends NetClient | ||||
| 			Disconnection.of(this).onDisconnection(); | ||||
| 		} | ||||
| 		_connectionState = ConnectionState.DISCONNECTED; | ||||
| 		super.onDisconnection(); | ||||
| 	} | ||||
| 	 | ||||
| 	public void closeNow() | ||||
| 	{ | ||||
| 		disconnect(); | ||||
| 		onDisconnection(); | ||||
| 	} | ||||
| 	 | ||||
| 	public void close(ServerPacket packet) | ||||
|   | ||||
| @@ -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; | ||||
| 		} | ||||
| 		 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment