Repository navigation
fix(desktop): recover remote workers on another gateway route - #1252
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 24, 2026 20:55
This was referenced Nov 24, 2026
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.
Problem
A paired Remote Desktop can reach a gateway through an alternate route while its bundled worker keeps retrying an unavailable address from its existing enrollment.
Change
Keep the worker's saved route as its first choice. After a WorkerLink transport error or a timed-out Hello to Welcome handshake, consider the paired gateway's HTTPS routes only when its fingerprint matches the worker's own pin. Verify the TLS pin and authenticate the existing worker through ProbeNetworkRoute before moving WorkerLink and UpdateService. If a candidate passes the probe but fails to open WorkerLink, try the remaining candidates before retrying one that failed. Keep the selected alternate in memory so the worker profile, identity and journal remain intact.
Thanks @marcinniewinski for reporting and helping diagnose the issue.
Fixes: #68
Verification
19b089f4a: 34 integration tests passed with temp-directory cleanup. Coverage includes healthy primary route, canceled WorkerLink streams on primary and alternate routes, handshake timeout, failover for WorkerLink and UpdateService, recovery after Desktop restart, rejection of a differently pinned endpoint, and existing enrollment and route migration paths.73cb2adc3: a separate runtime reproduction held TCP open without completing TLS on the saved route. The worker timed out, authenticated through the alternate and kept the original profile intact.73cb2adc3, 13 tests total. The GitHub-create failure also reproduced on cleandevand passed in CI on19b089f4a.19b089f4awith a real bundled worker process and TLS fixtures. The original Windows installation has only been checked for TCP reachability so far.