Erweiteurngen

This commit is contained in:
2026-01-07 10:46:28 +01:00
parent ce012ff82f
commit 5111d6b4f5
2 changed files with 5 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
<groupId>de.assecutor.votianlt</groupId> <groupId>de.assecutor.votianlt</groupId>
<artifactId>votianlt</artifactId> <artifactId>votianlt</artifactId>
<version>0.8.0</version> <version>0.8.1</version>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@@ -198,19 +198,20 @@ public class ClientConnectionService {
@Scheduled(fixedRateString = "${app.client.ping.interval-seconds:15}000") @Scheduled(fixedRateString = "${app.client.ping.interval-seconds:15}000")
public void sendPingsToAllClients() { public void sendPingsToAllClients() {
log.info("[ClientConnectionService] Ping cycle started - pluginConnected={}, connectedClients={}", log.info("[ClientConnectionService] Ping cycle started - pluginConnected={}, connectedClients={}",
pluginManager.isConnected(), connectedClients.size()); pluginManager.isConnected(), getConnectedClientCount());
if (!pluginManager.isConnected()) { if (!pluginManager.isConnected()) {
log.info("[ClientConnectionService] Plugin not connected, skipping ping cycle"); log.info("[ClientConnectionService] Plugin not connected, skipping ping cycle");
return; return;
} }
if (connectedClients.isEmpty()) { int connectedCount = getConnectedClientCount();
if (connectedCount == 0) {
log.info("[ClientConnectionService] No connected clients, skipping ping cycle"); log.info("[ClientConnectionService] No connected clients, skipping ping cycle");
return; return;
} }
log.info("[ClientConnectionService] Starting ping cycle for {} clients", connectedClients.size()); log.info("[ClientConnectionService] Starting ping cycle for {} clients", connectedCount);
Instant now = Instant.now(); Instant now = Instant.now();
for (Map.Entry<String, ClientState> entry : connectedClients.entrySet()) { for (Map.Entry<String, ClientState> entry : connectedClients.entrySet()) {