From b28a97e072f9e28f16d994d5911532761d504cfc Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Thu, 8 Feb 2024 14:01:42 +0100 Subject: [PATCH] removeClient --- src/main/java/ClientHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ClientHandler.java b/src/main/java/ClientHandler.java index fa4b924..74fa305 100644 --- a/src/main/java/ClientHandler.java +++ b/src/main/java/ClientHandler.java @@ -39,7 +39,7 @@ public class ClientHandler implements Runnable { throw new RuntimeException(e); // Handle exceptions by throwing a runtime exception } finally { - //chatServer.removeClient(this); + chatServer.removeClient(this); chatServer.broadcastMessage(name + " disconnected."); // Broadcast a message when the client is disconnected // Close resources in the finally block