public void stop() { try { if (streamOut != null) streamOut.close(); if (socket != null) socket.close(); } catch (IOException ioe) { System.err.println("Error closing ..."); System.exit(0); } loginThread.close(); }