From 5111d6b4f5f4256c0d79653645d708493154ac79 Mon Sep 17 00:00:00 2001 From: Sven Carstensen Date: Wed, 7 Jan 2026 10:46:28 +0100 Subject: [PATCH] Erweiteurngen --- pom.xml | 2 +- .../votianlt/service/ClientConnectionService.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 804180c..63d3d59 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.assecutor.votianlt votianlt - 0.8.0 + 0.8.1 jar diff --git a/src/main/java/de/assecutor/votianlt/service/ClientConnectionService.java b/src/main/java/de/assecutor/votianlt/service/ClientConnectionService.java index 789c784..ed93c3c 100644 --- a/src/main/java/de/assecutor/votianlt/service/ClientConnectionService.java +++ b/src/main/java/de/assecutor/votianlt/service/ClientConnectionService.java @@ -198,19 +198,20 @@ public class ClientConnectionService { @Scheduled(fixedRateString = "${app.client.ping.interval-seconds:15}000") public void sendPingsToAllClients() { log.info("[ClientConnectionService] Ping cycle started - pluginConnected={}, connectedClients={}", - pluginManager.isConnected(), connectedClients.size()); + pluginManager.isConnected(), getConnectedClientCount()); if (!pluginManager.isConnected()) { log.info("[ClientConnectionService] Plugin not connected, skipping ping cycle"); return; } - if (connectedClients.isEmpty()) { + int connectedCount = getConnectedClientCount(); + if (connectedCount == 0) { log.info("[ClientConnectionService] No connected clients, skipping ping cycle"); return; } - log.info("[ClientConnectionService] Starting ping cycle for {} clients", connectedClients.size()); + log.info("[ClientConnectionService] Starting ping cycle for {} clients", connectedCount); Instant now = Instant.now(); for (Map.Entry entry : connectedClients.entrySet()) {