🚇 Adds hasSubcribers to event socket for early return
This commit is contained in:
@@ -39,6 +39,7 @@ class AnalyticsService {
|
||||
TaskManager *_taskManager;
|
||||
|
||||
void updateAnalytics() {
|
||||
if (!_socket->hasSubscribers(EVENT_ANALYTICS)) return;
|
||||
doc.clear();
|
||||
doc["uptime"] = millis() / 1000;
|
||||
doc["free_heap"] = ESP.getFreeHeap();
|
||||
|
||||
Reference in New Issue
Block a user