Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): re-register Connect tunnel origin after backend port hop #12724

Closedmacodev00(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/12724/headopened View on GitHub

Showing 11 changed files with 52 additions and 0 deletions (loading 8).

x
0 of 11 viewed, 11 left
3 additions and 0 deletionsapps/desktop/src/app/DesktopApp.tsModified
View file
@@ -157,6 +157,7 @@
​
+/** Bootstraps the Electron desktop host and local backend. */
const bootstrap = Effect.gen(function* () {
const state = yield* DesktopState.DesktopState;
const environment = yield* DesktopEnvironment.DesktopEnvironment;
@@ -201,6 +202,8 @@
​
const backendPortSelection = yield* resolveDesktopBackendPort(environment.configuredBackendPort);
const backendPort = backendPortSelection.port;
+ // A scan can land on a different port than the last T3 Connect registration.
+ // UI-linked environments re-register that origin from the signed-in renderer.
yield* logBootstrapInfo(
backendPortSelection.selectedByScan
? "selected backend port via sequential scan"
46 additions and 0 deletionsapps/server/src/cloud/ManagedEndpointRuntime.test.tsModified
View file
@@ -351,6 +351,52 @@
}),
​
+ it.effect("restarts the connector when the managed origin port changes", () =>
+ Effect.gen(function* () {
+ const spawned: Array<number> = [];
+ const killed: Array<number> = [];