Erweiteurngen
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user