diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index 8a65b1a..70929e7 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -31,9 +31,11 @@ public class ChatServer { public void broadcastMessage(String message) { System.out.println(message); + if (message != null) { for (ClientHandler client : clients) { client.sendMessage(message); } + } }