fix(bridge): dial the configured port, and back off when refused (D154, D155) #15
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/config-before-link"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the phase 18 walk (§34.3 step 2). The org lead chose to fold both into phase 18 (D154, D155). Merge together with Rust-Link#15, which makes the sidecar refuse a plugin that names another server. The second commit here is what keeps that refusal from becoming a flood.
1. The plugin dialed 7799 regardless of its config (D154)
Init()startedLinkLoopbeforeLoaded()read the config. Both frameworks callInitfirst, so the thread's first dial saw_config == nulland used the 7799 fallback, on Oxide and Carbon alike:With one server per host, 7799 was its own sidecar by coincidence, which is how every earlier rig passed. With two on a host (the installer's named instances), the second server dialed the first server's sidecar and sat in its accept backlog. When alpha's plugin reloaded, alpha's sidecar accepted beta's connection, and the website showed server
alphawith hostname "rg18 beta" and beta's wipe id.Fix:
LoadConfigValues()moves intoInit(), before the thread starts.Loaded()keeps its log line and the lease/world/reward loads.LoadConfigValueshas no other caller.2. The backoff never held (D155's consequence)
The reconnect backoff waited on
Wake, whichEmitsignals on every frame, so it lasted only until the next hook fired. That was invisible while a failed connect was silent. Against a sidecar that refuses, the walk measured ~250 redials a second, each printing two console lines and rebuilding the boards.Fix: wait on
_stopping, the handle that already exists so a connect isn't abandoned byEmit.Unloadstill ends the wait at once. The backoff also resets only after a link has held for 10 s (StableLinkMs); a link closed on arrival used to reset it to 500 ms on every accept.Proof (phase 18 rig: alpha + beta on Oxide, gamma on Carbon)
plugin_connected: true, and the site shows each server under its own hostname and wipe.06:18:00.69 · 06:18:04.70 · 06:18:09.70 · 06:18:14.70 · 06:18:19.70 …Unloadstall on any reload.node scripts/checkPlugin.jsand its tests are green.Merging releases v0.1.1. The installer's
bundle.ymlrecomposesv2/rust/current.json, and the walk re-runs from that release.🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
fix(bridge): read the config before the link thread dials (D154)to fix(bridge): dial the configured port, and back off when refused (D154, D155)