Repository navigation
Conversation
ADR 0005 records why the launchers keep the relay running when the listener stops, and why outputs given on the command line retry. Adds Instructor to the glossary and uses it where docs and docstrings said operator.
…trying relay --tcp <ip:port> [--mirror <ip:port>] connects those outputs on start-up and retries each every 500 ms until it connects and again after it drops, driven by the Update tick. Disconnect TCP or Disconnect mirror stops the retrying. Without options nothing changes. A failed write to the TCP peer now ends the connection and reports it, for clicked connections too, so a closed listener is noticed. The TCP connect runs in short slices so Disconnect takes effect mid-connect.
Back to a blocking TCP connect, so a slow link still connects; an attempt that completes after Disconnect is dropped. A drop from a live connection reconnects at once; failed attempts wait RECONNECT_INTERVAL. No error banner while retrying, and a log line when an output connects. Clicking Connect takes that output over from the command line. The retry state is one Retry struct per output, with the logic in State. Docs: Listener added to the glossary, ADR 0003 no longer repeats itself, ADR 0005 says the launchers are planned, and live_groups' messages say a relay started with --mirror reconnects by itself.
|
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.



Closes #276
Summary
A failed write to the TCP peer now ends the connection and reports it, for clicked connections too. Before, the relay kept writing into a dead socket and still showed it as connected. While retrying, the window shows "waiting for , retrying" with no error banner. The event log gets one line per run of failed attempts, and a line when the output connects.
This also includes the decision behind the launchers (#278). ADR 0005 says the relay outlives the Listener, because the plugin can't reconnect to a relay that has restarted (#256, #255). The glossary gains Instructor (replacing "operator" in two docstrings and ADR 0004) and Listener.
Evidence
cargo test: 25 passed, 19 failed):cargo test: 44 passed on 3 runs in a row.uv run pytest: 124 passed.relay.exeon Windows:Not verified: anything with the plugin, X-Plane, real iMotions or the lab PCs.
Merge Danger
Door: two-way
Without options the only change in behaviour is that a TCP connection whose other end has gone is now shown as disconnected. Before, it stayed "connected" in name only. Reverting the PR restores the old behaviour.
Blast Radius: relay
BatonShutdown), a relay started with--tcpreconnects by itself. The README says so.