Browse Source

Close server at the end

remotes/origin/feature/client/exchange-messages-between-client-server
Alena Bandarovich 11 months ago
parent
commit
6bb126c186
  1. 6
      src/main/java/ChatClient.java

6
src/main/java/ChatClient.java

@ -60,6 +60,12 @@ public class ChatClient extends JFrame implements KeyListener {
}
} catch (IOException e) {
JOptionPane.showMessageDialog(null, "Verbindung zum Server \"" + address + "\" fehlgeschlagen.");
} finally {
try {
connectionToServer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

Loading…
Cancel
Save