Comment out nextSpirit() call in server.js

This commit is contained in:
2025-05-28 06:12:05 +02:00
parent 5f472ee1d3
commit 1cf1347e2d

View File

@@ -107,7 +107,7 @@ wss.on('connection', (socket) => {
spiritIntervalMs: SPIRIT_INTERVAL_MS
}));
nextSpirit();
// --- WICHTIG: KEIN nextSpirit() hier! ---
// Starte Timer falls das der erste Client ist
if (wss.clients.size === 1) {
@@ -120,7 +120,7 @@ wss.on('connection', (socket) => {
if (!hasOpenClients()) {
stopSpiritTimer();
}
}, 100); // etwas warten, falls kurzzeitig mehrere Clients disconnecten/reconnecten
}, 100);
});
});