@Override
    public void run() {
        while (true) {
            System.gc();
            //System.out.println("run");
            try {
                this.setChanged();
                this.notifyObservers(oIn.readObject());
            } catch (EOFException | SocketException ex) {
                break;
            } catch (IOException ex) {
                Logger.getLogger(ClientConnection.class.getName()).log(Level.SEVERE, null, ex);
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(ClientConnection.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        try {
            System.out.println("client disconnected");
            oIn.close();
            oOut.close();
            this.setChanged();
            this.notifyObservers(new ServerMessage(1, name));
            this.deleteObservers();
        } catch (IOException ex) {
            Logger.getLogger(ClientConnection.class.getName()).log(Level.SEVERE, null, ex);
        }

    }