diff --git a/changelog.md b/changelog.md index 44687fe..6bf1f6f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-03-17 - 4.8.1 - fix(remoteingress-core) +remove tunnel writer timeouts from edge and hub buffered writes + +- Drops the 30 second timeout wrapper around writer.write_all and writer.flush in both edge and hub tunnel writers. +- Updates error logging to report write failures without referring to stalled writes. + ## 2026-03-17 - 4.8.0 - feat(events) include disconnect reasons in edge and hub management events diff --git a/rust/crates/remoteingress-core/src/edge.rs b/rust/crates/remoteingress-core/src/edge.rs index b634c79..e25cc70 100644 --- a/rust/crates/remoteingress-core/src/edge.rs +++ b/rust/crates/remoteingress-core/src/edge.rs @@ -409,18 +409,14 @@ async fn connect_to_hub_and_run( // TLS records and syscalls. Flushed after each frame to avoid holding data. let mut writer = tokio::io::BufWriter::with_capacity(65536, write_half); let mut write_error = false; - let write_timeout = Duration::from_secs(30); loop { tokio::select! { biased; // control frames always take priority over data ctrl = tunnel_ctrl_rx.recv() => { match ctrl { Some(frame_data) => { - let ok = tokio::time::timeout(write_timeout, async { - writer.write_all(&frame_data).await?; - writer.flush().await - }).await; - if !matches!(ok, Ok(Ok(()))) { write_error = true; break; } + if writer.write_all(&frame_data).await.is_err() { write_error = true; break; } + if writer.flush().await.is_err() { write_error = true; break; } } None => break, } @@ -428,11 +424,8 @@ async fn connect_to_hub_and_run( data = tunnel_data_rx.recv() => { match data { Some(frame_data) => { - let ok = tokio::time::timeout(write_timeout, async { - writer.write_all(&frame_data).await?; - writer.flush().await - }).await; - if !matches!(ok, Ok(Ok(()))) { write_error = true; break; } + if writer.write_all(&frame_data).await.is_err() { write_error = true; break; } + if writer.flush().await.is_err() { write_error = true; break; } } None => break, } @@ -441,7 +434,7 @@ async fn connect_to_hub_and_run( } } if write_error { - log::error!("Tunnel writer failed or stalled, signalling reader for fast reconnect"); + log::error!("Tunnel writer failed, signalling reader for fast reconnect"); let _ = writer_dead_tx.send(()); } }); diff --git a/rust/crates/remoteingress-core/src/hub.rs b/rust/crates/remoteingress-core/src/hub.rs index 1900746..9245a39 100644 --- a/rust/crates/remoteingress-core/src/hub.rs +++ b/rust/crates/remoteingress-core/src/hub.rs @@ -396,18 +396,14 @@ async fn handle_edge_connection( // TLS records and syscalls. Flushed after each frame to avoid holding data. let mut writer = tokio::io::BufWriter::with_capacity(65536, write_half); let mut write_error = false; - let write_timeout = Duration::from_secs(30); loop { tokio::select! { biased; // control frames always take priority over data ctrl = ctrl_rx.recv() => { match ctrl { Some(frame_data) => { - let ok = tokio::time::timeout(write_timeout, async { - writer.write_all(&frame_data).await?; - writer.flush().await - }).await; - if !matches!(ok, Ok(Ok(()))) { write_error = true; break; } + if writer.write_all(&frame_data).await.is_err() { write_error = true; break; } + if writer.flush().await.is_err() { write_error = true; break; } } None => break, } @@ -415,11 +411,8 @@ async fn handle_edge_connection( data = data_rx.recv() => { match data { Some(frame_data) => { - let ok = tokio::time::timeout(write_timeout, async { - writer.write_all(&frame_data).await?; - writer.flush().await - }).await; - if !matches!(ok, Ok(Ok(()))) { write_error = true; break; } + if writer.write_all(&frame_data).await.is_err() { write_error = true; break; } + if writer.flush().await.is_err() { write_error = true; break; } } None => break, } @@ -428,7 +421,7 @@ async fn handle_edge_connection( } } if write_error { - log::error!("Tunnel writer to edge failed or stalled, signalling reader for fast cleanup"); + log::error!("Tunnel writer to edge failed, signalling reader for fast cleanup"); let _ = writer_dead_tx.send(()); } }); diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 5e43f13..4b59805 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/remoteingress', - version: '4.8.0', + version: '4.8.1', description: 'Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.' }