1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-05 11:23:47 +01:00
This commit is contained in:
J. Nick Koston
2025-06-23 11:37:27 +02:00
parent 93245a24b5
commit 76a59759b2

View File

@@ -157,11 +157,11 @@ void APIServer::loop() {
} }
} }
// Process clients and remove disconnected ones in a single pass
if (this->clients_.empty()) { if (this->clients_.empty()) {
return; return;
} }
// Process clients and remove disconnected ones in a single pass
// Check network connectivity once for all clients // Check network connectivity once for all clients
if (!network::is_connected()) { if (!network::is_connected()) {
// Network is down - disconnect all clients // Network is down - disconnect all clients