public synchronized void close() {
            if(!closed){
                System.out.println("Умираю :(");
                if(battleStarted)
                	battle.removeChannel(this);
                if(userId != null){
                    gameServer.deleteUser(userId, currentBattle);
                    userId = null;
                }


                userProcessorQueue.remove(this);
                if (!socket.isClosed()) {
                    try {
                        socket.close();
                    } catch (IOException ignored) {}
                }
                closed = true;
            }
        }