mirror of
https://github.com/esphome/esphome.git
synced 2025-09-18 19:22:22 +01:00
more api loop reductions
This commit is contained in:
@@ -158,7 +158,7 @@ void APIConnection::loop() {
|
|||||||
|
|
||||||
if (!this->list_entities_iterator_.completed())
|
if (!this->list_entities_iterator_.completed())
|
||||||
this->list_entities_iterator_.advance();
|
this->list_entities_iterator_.advance();
|
||||||
if (!this->initial_state_iterator_.completed() && this->list_entities_iterator_.completed())
|
else if (!this->initial_state_iterator_.completed())
|
||||||
this->initial_state_iterator_.advance();
|
this->initial_state_iterator_.advance();
|
||||||
|
|
||||||
static uint8_t max_ping_retries = 60;
|
static uint8_t max_ping_retries = 60;
|
||||||
|
@@ -136,7 +136,7 @@ void APIServer::schedule_reboot_timeout_() {
|
|||||||
|
|
||||||
void APIServer::loop() {
|
void APIServer::loop() {
|
||||||
// Accept new clients only if the socket exists and has incoming connections
|
// Accept new clients only if the socket exists and has incoming connections
|
||||||
if (this->socket_ && this->socket_->ready()) {
|
if (this->socket_->ready()) {
|
||||||
while (true) {
|
while (true) {
|
||||||
struct sockaddr_storage source_addr;
|
struct sockaddr_storage source_addr;
|
||||||
socklen_t addr_len = sizeof(source_addr);
|
socklen_t addr_len = sizeof(source_addr);
|
||||||
|
Reference in New Issue
Block a user