1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01: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

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;