From 18b9ff3b033db7d1f5c443e5e9ab146fb2e0ea96 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Wed, 7 Feb 2024 00:23:31 +0100 Subject: [PATCH] clients in CopyOnWriteList --- src/main/java/ChatServer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index dc94664..fdf1007 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -19,6 +19,7 @@ public class ChatServer { while(true) { Socket connectionToClient = serverSocket.accept(); ClientHandler client = new ClientHandler(this, connectionToClient); + clients.add(client); System.out.println("Accepted new Client"); } } catch (IOException e) {