From c3fe269dc62b4a58ec9a731abd19915462bbcc3a Mon Sep 17 00:00:00 2001 From: Alois Date: Wed, 29 Jul 2026 01:01:53 +0200 Subject: [PATCH] Keep idle streams from closing connections --- transport/src/connection.rs | 3 +-- transport/src/generic_connection.rs | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/transport/src/connection.rs b/transport/src/connection.rs index ec3e33a..9d59af4 100644 --- a/transport/src/connection.rs +++ b/transport/src/connection.rs @@ -973,8 +973,7 @@ impl Receiver { return Err(CommunicationError::StreamError); } Err(_) => { - warn!("[Receiver] length-prefix read timed out"); - return Err(CommunicationError::StreamError); + return Ok(ReceivedFrame::Idle); } } diff --git a/transport/src/generic_connection.rs b/transport/src/generic_connection.rs index 1855c90..9222d27 100644 --- a/transport/src/generic_connection.rs +++ b/transport/src/generic_connection.rs @@ -290,12 +290,6 @@ impl GenericReceiver { break; } Err(_) => { - tracing::warn!( - "MTP receive stream timed out while reading frame header" - ); - let _ = tx.send(Err(CommunicationError::StreamError)).await; - connection - .close(policy.application_close_code, b"frame header timeout"); break; } }