debug(media): add connection diagnostics for direct P2P drops
When direct P2P calls show 100% datagram drops, we need to know
WHY send_media() fails. This commit adds:
- Remote address + stable_id logging on A-role accept and D-role
dial success (dual_path.rs) — tells us which candidate won
- Remote address + max_datagram_size on engine transport init —
verifies datagrams are negotiated
- last_send_err in send heartbeat — captures the actual error
from send_datagram() failures
- QuinnTransport::remote_address() helper
Also fixes UI badge: was looking for wrong event name
("dual_path_race_won" → "path_negotiated").
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -202,12 +202,20 @@ pub async fn race(
|
||||
tokio::select! {
|
||||
v4 = wzp_transport::accept(&ep_for_fut) => {
|
||||
let conn = v4.map_err(|e| anyhow::anyhow!("v4 accept: {e}"))?;
|
||||
tracing::info!("dual_path: A-role accepted on IPv4 endpoint");
|
||||
tracing::info!(
|
||||
remote = %conn.remote_address(),
|
||||
stable_id = conn.stable_id(),
|
||||
"dual_path: A-role accepted on IPv4 endpoint"
|
||||
);
|
||||
Ok(QuinnTransport::new(conn))
|
||||
}
|
||||
v6 = wzp_transport::accept(&v6_ep) => {
|
||||
let conn = v6.map_err(|e| anyhow::anyhow!("v6 accept: {e}"))?;
|
||||
tracing::info!("dual_path: A-role accepted on IPv6 endpoint");
|
||||
tracing::info!(
|
||||
remote = %conn.remote_address(),
|
||||
stable_id = conn.stable_id(),
|
||||
"dual_path: A-role accepted on IPv6 endpoint"
|
||||
);
|
||||
Ok(QuinnTransport::new(conn))
|
||||
}
|
||||
}
|
||||
@@ -216,6 +224,11 @@ pub async fn race(
|
||||
let conn = wzp_transport::accept(&ep_for_fut)
|
||||
.await
|
||||
.map_err(|e| anyhow::anyhow!("direct accept: {e}"))?;
|
||||
tracing::info!(
|
||||
remote = %conn.remote_address(),
|
||||
stable_id = conn.stable_id(),
|
||||
"dual_path: A-role accepted (v4-only)"
|
||||
);
|
||||
Ok(QuinnTransport::new(conn))
|
||||
}
|
||||
}
|
||||
@@ -316,6 +329,8 @@ pub async fn race(
|
||||
tracing::info!(
|
||||
%candidate,
|
||||
candidate_idx = idx,
|
||||
remote = %conn.remote_address(),
|
||||
stable_id = conn.stable_id(),
|
||||
"dual_path: direct dial succeeded on candidate"
|
||||
);
|
||||
// Abort the remaining in-flight
|
||||
|
||||
@@ -33,6 +33,11 @@ impl QuinnTransport {
|
||||
&self.connection
|
||||
}
|
||||
|
||||
/// Remote address of the peer on this connection.
|
||||
pub fn remote_address(&self) -> std::net::SocketAddr {
|
||||
self.connection.remote_address()
|
||||
}
|
||||
|
||||
/// Send raw bytes as a QUIC datagram (no MediaPacket framing).
|
||||
pub fn send_raw_datagram(&self, data: &[u8]) -> Result<(), TransportError> {
|
||||
self.connection
|
||||
|
||||
Reference in New Issue
Block a user