|
|
@ -62,12 +62,16 @@ public class ChatClient extends JFrame implements KeyListener { |
|
|
|
JOptionPane.showMessageDialog(null, "Verbindung zum Server \"" + address + "\" fehlgeschlagen."); |
|
|
|
} |
|
|
|
finally { |
|
|
|
if (connectionToServer != null) { |
|
|
|
try { |
|
|
|
connectionToServer.close(); |
|
|
|
} catch (IOException e) { |
|
|
|
} |
|
|
|
|
|
|
|
catch (IOException e) { |
|
|
|
// TODO Auto-generated catch block |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
// fromServerReader.close(); (warten auf ServerReader) |
|
|
|
// toServerWriter.close(); (warten auf ServerWriter) |
|
|
|
} |
|
|
|