From cb610892a623b6457e80347966446f4afd9c4cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Jacobs?= Date: Fri, 3 Oct 2025 20:21:37 +0200 Subject: [PATCH] fix incomplete timer unqueuing that prevent any further timer in the same task --- embassy-time-queue-utils/CHANGELOG.md | 2 ++ embassy-time-queue-utils/src/queue_integrated.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/embassy-time-queue-utils/CHANGELOG.md b/embassy-time-queue-utils/CHANGELOG.md index 03d89f9a74..506cddb146 100644 --- a/embassy-time-queue-utils/CHANGELOG.md +++ b/embassy-time-queue-utils/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased - ReleaseDate +- Fix usage of never ending timers + ## 0.3.0 - 2025-08-26 ## 0.2.1 - 2025-08-26 diff --git a/embassy-time-queue-utils/src/queue_integrated.rs b/embassy-time-queue-utils/src/queue_integrated.rs index 2731d1ac62..3b0f317700 100644 --- a/embassy-time-queue-utils/src/queue_integrated.rs +++ b/embassy-time-queue-utils/src/queue_integrated.rs @@ -130,6 +130,10 @@ impl Queue { // Remove it prev.set(item.next.get()); item.next.set(None); + // Presence of a waker is used by schedule_wake to determine + // if the item is part of the queue or not, + // so ensure there is no waker for items removed from the queue. + item.waker = None; } } }