Skip to content

Commit 00f8309

Browse files
authored
fix(iroh-relay): Report round-trip-latency instead of single-trip for QAD (#3230)
## Description Switches QAD latency to be round-trip instead of single-trip to match STUN latencies. ## Notes & open questions Fixes #3225 <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist <!-- Remove any that are not relevant. --> - [x] Self-review.
1 parent d8c8c8e commit 00f8309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iroh-relay/src/quic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ impl QuicClient {
273273
// if we've sent to an ipv4 address, but received an observed address
274274
// that is ivp6 then the address is an [IPv4-Mapped IPv6 Addresses](https://doc.rust-lang.org/beta/std/net/struct.Ipv6Addr.html#ipv4-mapped-ipv6-addresses)
275275
observed_addr = SocketAddr::new(observed_addr.ip().to_canonical(), observed_addr.port());
276-
let latency = conn.rtt() / 2;
276+
let latency = conn.rtt();
277277
// gracefully close the connections
278278
conn.close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
279279
Ok((observed_addr, latency))

0 commit comments

Comments
 (0)