From e16619ebb1f18ff41d2c34c6b3c8ebaf30f40163 Mon Sep 17 00:00:00 2001 From: Marc Dimmerling Date: Wed, 7 Feb 2024 20:37:05 +0100 Subject: [PATCH] Finally box, connectionToServer --- src/main/java/ChatClient.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index dac4280..7eee6a4 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -61,6 +61,15 @@ public class ChatClient extends JFrame implements KeyListener { catch (Exception e) { JOptionPane.showMessageDialog(null, "Verbindung zum Server \"" + address + "\" fehlgeschlagen."); } + finally { + try { + connectionToServer.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } } @Override