@Override
    public void run() {
        System.out.println( threadId + " Start server thread");

        while ( isRunning ) {

            try {
                Socket socket = listener.accept();

                ClientThread clientThread = new ClientThread(socket);
                clientList.add(clientThread);
                clientThread.start();

            } catch (IOException e) {
                e.printStackTrace();
            }

        }

        for ( ClientThread client : clientList){
            client.stopThreadClient();
            try {
                client.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

        try {
            listener.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(threadId + " Stopped server thread");
    }