Browse Source

if connectionToServer

remotes/origin/server
Marc Dimmerling 11 months ago
parent
commit
0cf1553f66
  1. 14
      src/main/java/ChatClient.java

14
src/main/java/ChatClient.java

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

Loading…
Cancel
Save