//Then wait for reconnection!
HttpServletRequest request = this.getThreadLocalRequest();
HttpSession session = request.getSession();
Player player = (Player)session.getAttribute("PlayerInstance");
GameServer game = (GameServer)session.getAttribute("GameServerInstance");
//Se ele est� ligado a um jogo
//E se esse jogo j� come�ou
if (game != null && game.isRunning()){
System.out.println("Player "+player.getName()+" disconnected/closed the browser while playing!");
MainServer.getMainServerInstance().playerDisconnected(player, game);
}
else{
System.out.println("Closed browser BUT is not playing");