Browse Source

removeClient

remotes/origin/server
Valentin Spiroski 11 months ago
parent
commit
b28a97e072
  1. 2
      src/main/java/ClientHandler.java

2
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

Loading…
Cancel
Save