Conversation
4d33c2d to
e15cd96
Compare
333e2ac to
6d80b55
Compare
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3921/docs/iroh/ Last updated: 2026-02-20T12:16:58Z |
iroh/src/endpoint.rs
Outdated
|
|
||
| // Wait a bit. `online` does not mean that the connection to the home relay was *established*, | ||
| // only that the home relay was *chosen* based on the net report probes. | ||
| tokio::time::sleep(Duration::from_millis(500)).await; |
There was a problem hiding this comment.
this screams flakiness, can we detect this differently?
There was a problem hiding this comment.
Currently, no. Maybe online should only resolve once we're actually connected to the home relay?
There was a problem hiding this comment.
yeah, potentially that would make sense
There was a problem hiding this comment.
I pushed a change to the test that uses a log assertion instead of a timeout, so this can't flake anymore.
I'd like to leave adding a proper API for this to a followup though as it really is unrelated to the change in this PR.
| // We assert that we get the warn log once for endpoint 1, and not at all for endpoint 2. | ||
| logs_assert(|logs| { | ||
| let expected_line = |line: &str| { | ||
| line.contains("WARN") && line.contains("Another endpoint connected with the same endpoint id. No more messages will be received") |
There was a problem hiding this comment.
can't we check this differently than log assertions? :/
There was a problem hiding this comment.
Currently, no. There's nothing on the endpoint to check relay status. Maybe there should be.
b420ff2 to
7cf0ed9
Compare
Description
When the iroh relay receives a connection from an endpoint to which it already has a connection, it currently drops the old one immediately. The old endpoint did not receive any indication as to why its connection was dropped, so it would reconnect again right away. The connection would succeed: Now it was its turn to be accepted, and the other endpoint would be dropped from the relay. This back-and-forth loop would continue infinitely.
This PR changes this in the following way:
Healthmessage to the client, with a text string informing the client that it is now inactive because another endpoint connected. In iroh, wewarn!log this message.Breaking Changes
iroh_relay::server::client::RunErrorvariants changedNotes & open questions
Healthissue. However, adding new frames to the relay protocol currently will break all older clients. Therefore, this uses the stringly health frame for now.Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendmeFixes #3813