fix: throw error on ARQ max_retries exceeded to prevent silent deadlock that caused infinite upload timeouts

This commit is contained in:
ospab 2026-05-15 20:04:07 +03:00
parent d34a1dd29a
commit b082c158fd
1 changed files with 2 additions and 1 deletions

View File

@ -417,7 +417,8 @@ impl ProtocolMachine {
let now = Instant::now(); let now = Instant::now();
for frame in self.sent_history.iter_mut() { for frame in self.sent_history.iter_mut() {
if frame.retries >= self.max_retries { 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 { if now.duration_since(frame.last_sent) >= self.rto {
frame.last_sent = now; frame.last_sent = now;