1
0
mirror of https://github.com/esphome/esphome.git synced 2025-06-15 06:46:59 +02:00

Fix ethernet connection timeout issue caused by incorrect time value during setup (#8841)

This commit is contained in:
J. Nick Koston 2025-05-19 01:25:21 -04:00 committed by GitHub
parent 1ac51e7b3e
commit 78c63311c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,6 +35,8 @@ void Application::setup() {
for (uint32_t i = 0; i < this->components_.size(); i++) {
Component *component = this->components_[i];
// Update loop_component_start_time_ before calling each component during setup
this->loop_component_start_time_ = millis();
component->call();
this->scheduler.process_to_add();
this->feed_wdt();
@ -49,6 +51,8 @@ void Application::setup() {
this->scheduler.call();
this->feed_wdt();
for (uint32_t j = 0; j <= i; j++) {
// Update loop_component_start_time_ right before calling each component
this->loop_component_start_time_ = millis();
this->components_[j]->call();
new_app_state |= this->components_[j]->get_component_state();
this->app_state_ |= new_app_state;