fix(relay): stop bystander instances from capturing the relay host
Two mitigations for local multi-instance contention over the shared relay identity: - A standby instance now waits a 2-minute grace period after the host claim frees before taking over, so a cleanly restarting host (app update or relaunch) — which reclaims at boot with no wait — always wins the restart window instead of stranding paired devices on another process. - Dev instances never host the relay passively: dev scripts set OPENCHAMBER_RELAY_HOST=off and the Electron dev shell is detected via OPENCHAMBER_ELECTRON_DEV. Explicit enable/pairing on such an instance still force-claims; OPENCHAMBER_RELAY_HOST=on overrides.
This commit is contained in:
@@ -114,6 +114,9 @@ clearViteCache();
|
||||
|
||||
const api = run('api', 'bun', ['run', '--cwd', 'packages/web', 'dev:server:watch'], {
|
||||
OPENCHAMBER_PORT: backendPort,
|
||||
// Dev backends share the relay identity with the production instance; never
|
||||
// let them capture the machine's relay host on their own.
|
||||
OPENCHAMBER_RELAY_HOST: process.env.OPENCHAMBER_RELAY_HOST || 'off',
|
||||
});
|
||||
const vite = run(
|
||||
'vite',
|
||||
|
||||
Reference in New Issue
Block a user