mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Fix ethernet connection timeout issue caused by incorrect time value during setup (#8841)
This commit is contained in:
		| @@ -35,6 +35,8 @@ void Application::setup() { | |||||||
|   for (uint32_t i = 0; i < this->components_.size(); i++) { |   for (uint32_t i = 0; i < this->components_.size(); i++) { | ||||||
|     Component *component = this->components_[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(); |     component->call(); | ||||||
|     this->scheduler.process_to_add(); |     this->scheduler.process_to_add(); | ||||||
|     this->feed_wdt(); |     this->feed_wdt(); | ||||||
| @@ -49,6 +51,8 @@ void Application::setup() { | |||||||
|       this->scheduler.call(); |       this->scheduler.call(); | ||||||
|       this->feed_wdt(); |       this->feed_wdt(); | ||||||
|       for (uint32_t j = 0; j <= i; j++) { |       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(); |         this->components_[j]->call(); | ||||||
|         new_app_state |= this->components_[j]->get_component_state(); |         new_app_state |= this->components_[j]->get_component_state(); | ||||||
|         this->app_state_ |= new_app_state; |         this->app_state_ |= new_app_state; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user