From 20bc290c181686f8c9f3ee0c24d08193a62fb58b Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Tue, 7 Apr 2026 11:01:03 +0400 Subject: [PATCH] fix: relay handles ping connections gracefully (no timeout errors) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relay recognizes SNI "ping" and returns immediately — no handshake, no stream accept, no timeout error logs. Client closes after QUIC connect for RTT measurement. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/wzp-relay/src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/wzp-relay/src/main.rs b/crates/wzp-relay/src/main.rs index 878c2b4..dc59472 100644 --- a/crates/wzp-relay/src/main.rs +++ b/crates/wzp-relay/src/main.rs @@ -299,6 +299,13 @@ async fn main() -> anyhow::Result<()> { let transport = Arc::new(wzp_transport::QuinnTransport::new(connection)); + // Ping connections: client just measures QUIC connect RTT. + // No handshake, no streams — client closes immediately after connecting. + if room_name == "ping" { + info!(%addr, "ping connection (RTT probe)"); + return; + } + // Probe connections use SNI "_probe" to identify themselves. // They skip auth + handshake and just do Ping->Pong + presence gossip. if room_name == "_probe" {