From d90c8f75605e8279ba587b31f6206e2496a614ae Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Wed, 7 Feb 2024 00:41:02 +0100 Subject: [PATCH] Abfrage ob Nachricht nicht leer ist --- src/main/java/ChatServer.java | 2 ++ 1 file changed, 2 insertions(+) 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); } + } }