This commit is contained in:
J. Nick Koston 2025-07-06 18:27:49 -05:00
parent 2dc222aea6
commit f395767766
No known key found for this signature in database

View File

@ -436,9 +436,10 @@ bool HOT Scheduler::cancel_item_locked_(Component *component, const char *name_c
// Check all containers for matching items
#if !defined(USE_ESP8266) && !defined(USE_RP2040)
// Cancel items in defer queue
// Only check defer queue for timeouts (intervals never go there)
if (type == SchedulerItem::TIMEOUT) {
for (auto &item : this->defer_queue_) {
if (item->component != component || item->type != type || item->remove) {
if (item->component != component || item->remove) {
continue;
}
const char *item_name = item->get_name();
@ -447,6 +448,7 @@ bool HOT Scheduler::cancel_item_locked_(Component *component, const char *name_c
total_cancelled++;
}
}
}
#endif
// Cancel items in the main heap