Rename variables to match code style

This commit is contained in:
Thomas Basler 2022-07-06 19:25:30 +02:00
parent 39e6a46665
commit 8b939f9418
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ private:
WebApiSysstatusClass _webApiSysstatus; WebApiSysstatusClass _webApiSysstatus;
WebApiWebappClass _webApiWebapp; WebApiWebappClass _webApiWebapp;
WebApiWsLiveClass _webApiWsLive; WebApiWsLiveClass _webApiWsLive;
unsigned long lastTimerCall = 0; unsigned long _lastWsCleanup = 0;
void onWebsocketEvent(AsyncWebSocket* server, AsyncWebSocketClient* client, AwsEventType type, void* arg, uint8_t* data, size_t len); void onWebsocketEvent(AsyncWebSocket* server, AsyncWebSocketClient* client, AwsEventType type, void* arg, uint8_t* data, size_t len);
}; };

View File

@ -47,9 +47,9 @@ void WebApiClass::loop()
_webApiWsLive.loop(); _webApiWsLive.loop();
// see: https://github.com/me-no-dev/ESPAsyncWebServer#limiting-the-number-of-web-socket-clients // see: https://github.com/me-no-dev/ESPAsyncWebServer#limiting-the-number-of-web-socket-clients
if (millis() - lastTimerCall > 1000) { if (millis() - _lastWsCleanup > 1000) {
_ws.cleanupClients(); _ws.cleanupClients();
lastTimerCall = millis(); _lastWsCleanup = millis();
} }
} }