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:
@@ -41,10 +41,6 @@ pub struct Cli {
|
|||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub no_hwencode: bool,
|
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
|
/// Maximum number of concurrent viewers. Additional connections are
|
||||||
/// politely refused with a "host full" message. Defaults to the
|
/// politely refused with a "host full" message. Defaults to the
|
||||||
/// connection-aware recommendation from the bandwidth pre-flight if
|
/// connection-aware recommendation from the bandwidth pre-flight if
|
||||||
@@ -88,7 +84,6 @@ pub struct HostOpts {
|
|||||||
pub bitrate: u32,
|
pub bitrate: u32,
|
||||||
pub framerate: u32,
|
pub framerate: u32,
|
||||||
pub no_hwencode: bool,
|
pub no_hwencode: bool,
|
||||||
pub low_latency: bool,
|
|
||||||
pub max_viewers: Option<u32>,
|
pub max_viewers: Option<u32>,
|
||||||
pub interactive: bool,
|
pub interactive: bool,
|
||||||
}
|
}
|
||||||
@@ -109,7 +104,6 @@ impl Cli {
|
|||||||
bitrate: self.bitrate,
|
bitrate: self.bitrate,
|
||||||
framerate: self.framerate,
|
framerate: self.framerate,
|
||||||
no_hwencode: self.no_hwencode,
|
no_hwencode: self.no_hwencode,
|
||||||
low_latency: self.low_latency,
|
|
||||||
max_viewers: self.max_viewers,
|
max_viewers: self.max_viewers,
|
||||||
interactive,
|
interactive,
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-7
@@ -147,13 +147,10 @@ async fn handle_peer(
|
|||||||
|
|
||||||
let bridge = tunnel::bridge(quic_send, quic_recv, tcp);
|
let bridge = tunnel::bridge(quic_send, quic_recv, tcp);
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
res = bridge => {
|
res = bridge => match res {
|
||||||
if let Err(e) = res {
|
Ok(()) => tracing::info!(%remote, "bridge closed cleanly"),
|
||||||
tracing::warn!(%remote, "bridge ended with error: {e:#}");
|
Err(e) => tracing::info!(%remote, "bridge ended: {e:#}"),
|
||||||
} else {
|
},
|
||||||
tracing::info!(%remote, "bridge closed cleanly");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ = cancel.cancelled() => {
|
_ = cancel.cancelled() => {
|
||||||
tracing::info!(%remote, "cancellation during stream");
|
tracing::info!(%remote, "cancellation during stream");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user