fix(remoteingress-core): initialize disconnect reason only when set in hub loop break paths

This commit is contained in:
2026-03-17 11:50:22 +00:00
parent 64572827e5
commit 38cde37cff
3 changed files with 10 additions and 2 deletions

View File

@@ -735,7 +735,9 @@ async fn handle_edge_connection(
// Single-owner I/O engine — no tokio::io::split, no mutex
let mut tunnel_io = remoteingress_protocol::TunnelIo::new(tls_stream, Vec::new());
let mut disconnect_reason = "unknown".to_string();
// Assigned in every break path of the hub_loop before use at the end.
#[allow(unused_assignments)]
let mut disconnect_reason = String::new();
'hub_loop: loop {
// Drain completed stream cleanups from spawned tasks