cleanup: demote clean-disconnect warn, drop dead --low-latency flag

handle_peer's `bridge ended with error: ...` log fired at WARN every
time a viewer cleanly closed — but bridge can only end three ways
(peer-close, local-socket-close, cancellation), none of which are real
errors. Collapsed to INFO for both Ok and Err arms; the message itself
still carries any error detail.

Also removed the `--low-latency` CLI flag and its HostOpts field. It
was a placeholder for an unimplemented Phase-2/3 SRT transport, never
read anywhere, and was generating a persistent dead_code warning. If
SRT ever happens, the flag can come back fresh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-22 03:50:20 -04:00
parent e1a018fdf7
commit 9625511c65
2 changed files with 4 additions and 13 deletions
-6
View File
@@ -41,10 +41,6 @@ pub struct Cli {
#[arg(long)]
pub no_hwencode: bool,
/// Use low-latency SRT transport instead of HTTP MPEG-TS (Phase 2/3).
#[arg(long)]
pub low_latency: bool,
/// Maximum number of concurrent viewers. Additional connections are
/// politely refused with a "host full" message. Defaults to the
/// connection-aware recommendation from the bandwidth pre-flight if
@@ -88,7 +84,6 @@ pub struct HostOpts {
pub bitrate: u32,
pub framerate: u32,
pub no_hwencode: bool,
pub low_latency: bool,
pub max_viewers: Option<u32>,
pub interactive: bool,
}
@@ -109,7 +104,6 @@ impl Cli {
bitrate: self.bitrate,
framerate: self.framerate,
no_hwencode: self.no_hwencode,
low_latency: self.low_latency,
max_viewers: self.max_viewers,
interactive,
}
+4 -7
View File
@@ -147,13 +147,10 @@ async fn handle_peer(
let bridge = tunnel::bridge(quic_send, quic_recv, tcp);
tokio::select! {
res = bridge => {
if let Err(e) = res {
tracing::warn!(%remote, "bridge ended with error: {e:#}");
} else {
tracing::info!(%remote, "bridge closed cleanly");
}
}
res = bridge => match res {
Ok(()) => tracing::info!(%remote, "bridge closed cleanly"),
Err(e) => tracing::info!(%remote, "bridge ended: {e:#}"),
},
_ = cancel.cancelled() => {
tracing::info!(%remote, "cancellation during stream");
}