Repository navigation
Conversation
This was referenced Sep 1, 2026
sthelen-enqs
self-requested a review
September 14, 2026 11:30
andig
force-pushed
the
upstream/reset-connection-backoff
branch
from
November 5, 2026 09:11
d70b889 to
643a4ac
Compare
Contributor
Author
|
@sthelen-enqs could you take a look and merge this if it is fine? It is part of the fork evcc currently ships, and getting it into |
Registering a remote service expresses fresh connection intent, but the per-SKI retry backoff (up to 10-20s) and a pending delay timer survived, deferring the attempt far beyond what a caller waiting for the connection expects. Cancel both on register, and cancel the pending timer on unregister as well so it no longer keeps the attempt flag set.
andig
force-pushed
the
upstream/reset-connection-backoff
branch
from
November 5, 2026 09:24
643a4ac to
82c4ad4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RegisterRemoteServiceexpresses fresh connection intent, but the per-SKI retry state survived it: the attempt counter kept whatever level earlier failures had reached, so the next attempt was deferred by the10-20srange even though the caller had just asked for the connection.A pending delay timer made it worse.
UnregisterRemoteServiceremoved the attempt counter but left the timer in place, and with itconnectionAttemptRunningset totrue.coordinateConnectionInitationsreturns early in that state, so the following registration's attempt was swallowed until the stale timer fired.This is visible from an application waiting for a device connection: evcc's device configuration test aborts after a fixed timeout, and once the backoff had escalated it never saw a connection again (evcc-io/evcc#25058 — delays of 14.2s, 12.9s and 10.2s against a 10s window, with the connection succeeding immediately after a restart).
Changes:
RegisterRemoteServicecancels a pending delay timer and drops the attempt counter before triggering discoveryUnregisterRemoteServicecancels the delay timer as well, so it no longer leaves the attempt flag setThe automatic retry behaviour on repeated failures is unchanged — only an explicit register/unregister resets it.
Test
Test_RegisterRemoteServiceResetsBackoffcovers the reset; it fails ondevwithout the change. Fullhubpackage passes.🤖 Generated with Claude Code