Skip to content

fix: reset backoff on any successful poll and fix refresh task cancellation race - #535

Merged
sockless-coding merged 1 commit into
masterfrom
fix_backoff
Nov 21, 2026
Merged

sockless-coding merged 1 commit into
masterfrom
fix_backoff

Conversation

@sockless-coding

Copy link
Copy Markdown
Owner

The device and energy coordinators only reset backoff when a poll returned changed data, so a device that kept reporting identical values after a network outage would stay in backoff forever. Any successful poll now resets backoff, matching the Aquarea and HWS coordinators.

A cancelled delayed-refresh task cleared _refresh_task in its finally block even when a newer task had already replaced it, dropping the reference so the next schedule_refresh() call couldn't cancel the pending task. Only clear the reference if it still points at the finishing task.

Drops the two corresponding strict xfails and adds a test for the energy coordinator's recovery-without-changes path.

…lation race

The device and energy coordinators only reset backoff when a poll
returned changed data, so a device that kept reporting identical
values after a network outage would stay in backoff forever. Any
successful poll now resets backoff, matching the Aquarea and HWS
coordinators.

A cancelled delayed-refresh task cleared _refresh_task in its finally
block even when a newer task had already replaced it, dropping the
reference so the next schedule_refresh() call couldn't cancel the
pending task. Only clear the reference if it still points at the
finishing task.

Drops the two corresponding strict xfails and adds a test for the
energy coordinator's recovery-without-changes path.
@sockless-coding
sockless-coding merged commit 6f15569 into master Nov 21, 2026
7 checks passed
@sockless-coding
sockless-coding deleted the fix_backoff branch November 21, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant