From 39d9621062326581d3a3646e7eb6a2e7685a258f Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Mon, 5 Feb 2024 13:39:27 +0100 Subject: [PATCH] small correction --- src/main/java/ClientHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/ClientHandler.java b/src/main/java/ClientHandler.java index 9c52f54..3b30c32 100644 --- a/src/main/java/ClientHandler.java +++ b/src/main/java/ClientHandler.java @@ -1,4 +1,6 @@ + import java.io.BufferedReader; + import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; @@ -38,10 +40,10 @@ public class ClientHandler implements Runnable { message = fromClientReader.readLine(); } } catch (IOException e) { - e.printStackTrace(); + throw new RuntimeException(e); + } finally { //chatServer.removeClient(this); - throw new RuntimeException(e); chatServer.broadcastMessage(name + " disconnected."); if (fromClientReader != null) {