Repository navigation
fix(remote-connect): reuse a serving relay route when reopening the invitation - #3880
Merged
bobleer merged 1 commit intoNov 12, 2026
Merged
Conversation
…nvitation Asking for the invitation again restarted routes that were already serving: the official route was torn down after a restored sign-in because no method was active yet, and a LAN relay restarted when the request named the interface it was already using. Adopt the connected official routing and reuse the running LAN relay for the same interface, so attached controllers stay connected.
3 tasks done
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.
Summary
Asking for the Remote Connect invitation again no longer restarts a route that is already serving.
prepare_relayranstop_relay_inner, dropping device routing and attached controllers.remote_connect_startnow returns the invitation directly when the official route already serves the signed-in account, andprepare_relayadopts routing that already serves the endpoint.start_lanreused the relay only on an exactactive_methodmatch, so a route started with an auto-chosen interface restarted when the request named that interface (or the reverse).serving_methodtreats a request for no interface or the interface in use as the same route.Type and Areas
Type: bug fix
Areas: assembly core (remote connect), desktop/Tauri
Motivation / Impact
Opening the invitation dialog again disconnected phones and controllers already attached. Requesting a different LAN interface still restarts the relay there.
Verification
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect --lib service::remote_connect::host_lifecycle_testscargo test --locked -p openbitfun-desktop --lib relay_routes_tests(includes newstarting_a_connected_route_again_only_returns_its_invitation)Remote scenarios: remote control, exercised against the loopback Relay fixture only, not the production Relay or a physical LAN interface.
Reviewer Notes
AI-assisted change, lightly tested as listed above.
Checklist