diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index 056a9bf85b..fc865d8b93 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -476,11 +476,6 @@ void Application::before_loop_tasks_(uint32_t loop_start_time) { this->in_loop_ = true; } -void Application::after_loop_tasks_() { - // Clear the in_loop_ flag to indicate we're done processing components - this->in_loop_ = false; -} - #ifdef USE_LWIP_FAST_SELECT bool Application::register_socket(struct lwip_sock *sock) { // It modifies monitored_sockets_ without locking — must only be called from the main loop. diff --git a/esphome/core/application.h b/esphome/core/application.h index 5cb5f32202..5e1dd12186 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -618,7 +618,7 @@ class Application { void enable_pending_loops_(); void activate_looping_component_(uint16_t index); void before_loop_tasks_(uint32_t loop_start_time); - void after_loop_tasks_(); + inline void ESPHOME_ALWAYS_INLINE after_loop_tasks_() { this->in_loop_ = false; } /// Process dump_config output one component per loop iteration. /// Extracted from loop() to keep cold startup/reconnect logging out of the hot path.