diff --git a/esphome/core/freertos_queue.h b/esphome/core/freertos_queue.h index 0548ebfc71..4209472cc2 100644 --- a/esphome/core/freertos_queue.h +++ b/esphome/core/freertos_queue.h @@ -39,9 +39,7 @@ template class FreeRTOSQueue { return false; if (xQueueSend(this->handle_, &element, 0) != pdPASS) { - portENTER_CRITICAL(); - this->dropped_count_++; - portEXIT_CRITICAL(); + this->increment_dropped_count(); return false; } return true;