Skip to content

fix(remote-connect): reuse a serving relay route when reopening the invitation - #3880

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fix-reuse-serving-relay-route
Nov 12, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fix-reuse-serving-relay-route

Conversation

@bobleer

@bobleer bobleer commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Asking for the Remote Connect invitation again no longer restarts a route that is already serving.

  • Official route. After a restored sign-in, device routing connects before any invitation is requested, so no method is active yet and prepare_relay ran stop_relay_inner, dropping device routing and attached controllers. remote_connect_start now returns the invitation directly when the official route already serves the signed-in account, and prepare_relay adopts routing that already serves the endpoint.
  • LAN route. start_lan reused the relay only on an exact active_method match, so a route started with an auto-chosen interface restarted when the request named that interface (or the reverse). serving_method treats 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_tests
  • cargo test --locked -p openbitfun-desktop --lib relay_routes_tests (includes new starting_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

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

…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.
@bobleer
bobleer merged commit 878235c into openBitFun:main Nov 12, 2026
13 checks passed
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