Aktualisiere WebSocket-Server und Daemon-Konfiguration
- Ändere die Pfade für SSL-Zertifikate in der Konfigurationsdatei. - Verbessere die Fehlerbehandlung beim Entfernen alter vorbereiteter Anweisungen in HouseWorker. - Füge Debug-Ausgaben zur Nachverfolgung von Verbindungen und Nachrichten im WebSocket-Server hinzu. - Implementiere Timeout-Logik für das Stoppen von Worker- und Watchdog-Threads. - Optimiere die Signalverarbeitung und Shutdown-Logik in main.cpp für bessere Responsivität.
This commit is contained in:
committed by
Torsten (PC)
parent
8fe816dddc
commit
bd961a03d4
@@ -15,11 +15,18 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <chrono>
|
||||
|
||||
struct WebSocketUserData {
|
||||
std::string userId;
|
||||
bool pongReceived = true;
|
||||
std::string pendingMessage;
|
||||
std::chrono::steady_clock::time_point lastPingTime;
|
||||
std::chrono::steady_clock::time_point lastPongTime;
|
||||
int pingTimeoutCount = 0;
|
||||
static constexpr int MAX_PING_TIMEOUTS = 3;
|
||||
static constexpr int PING_INTERVAL_SECONDS = 30;
|
||||
static constexpr int PONG_TIMEOUT_SECONDS = 10;
|
||||
};
|
||||
|
||||
class Worker; // forward
|
||||
|
||||
Reference in New Issue
Block a user