@Override
    public void run() {
        isAlive = true;
        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            while (isAlive) {
                String readLine = bufferedReader.readLine();
                parseCommand(readLine);
            }
        } catch (Exception e) {
        } finally {
            isAlive = false;
            try {
                server.removeClient(client);
                socket.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }