From b082c158fd48458af2ea64349f726b5405595572 Mon Sep 17 00:00:00 2001 From: ospab Date: Fri, 15 May 2026 20:04:07 +0300 Subject: [PATCH] fix: throw error on ARQ max_retries exceeded to prevent silent deadlock that caused infinite upload timeouts --- ostp-core/src/protocol.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ostp-core/src/protocol.rs b/ostp-core/src/protocol.rs index 6a9affe..9336b84 100644 --- a/ostp-core/src/protocol.rs +++ b/ostp-core/src/protocol.rs @@ -417,7 +417,8 @@ impl ProtocolMachine { let now = Instant::now(); for frame in self.sent_history.iter_mut() { if frame.retries >= self.max_retries { - continue; + tracing::error!("FATAL: Frame {} exceeded max retries ({}). Connection is dead.", frame.nonce, self.max_retries); + return Err(ProtocolError::State("connection dead, max retries exceeded".into())); } if now.duration_since(frame.last_sent) >= self.rto { frame.last_sent = now;