From 943b80bb8ab5e0f8f7a1365aeff3cd708d3a10ac Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <33485997+github-af@users.noreply.github.com> Date: Wed, 22 Jan 2025 09:50:44 +0100 Subject: [PATCH] receive: really close and forget on synchronization lost (possibly fix issue #4 also) --- src/receive/dispatch.rs | 1 - src/receive/reordering.rs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/receive/dispatch.rs b/src/receive/dispatch.rs index 84be913..dfc700e 100644 --- a/src/receive/dispatch.rs +++ b/src/receive/dispatch.rs @@ -56,7 +56,6 @@ pub(crate) fn start(receiver: &receive::Receiver) -> Result<(), receive::E } failed_transfers.insert(client_id); - ended_transfers.insert(client_id, client_sendq); } active_transfers = BTreeMap::new(); continue; diff --git a/src/receive/reordering.rs b/src/receive/reordering.rs index 5fa551f..b943b27 100644 --- a/src/receive/reordering.rs +++ b/src/receive/reordering.rs @@ -20,7 +20,8 @@ pub(crate) fn start(receiver: &receive::Receiver) -> Result<(), receive::E let (resync_needed, resync_block_id) = receiver.resync_needed_block_id.take(); if resync_needed { - log::debug!("forced resynchronization"); + log::debug!("forced resynchronization, propagating it"); + receiver.to_dispatch.send(None)?; if pending_messages.iter().any(Option::is_some) { log::warn!("forced resynchronization with pending messages, dropping everything"); pending_messages.fill_with(|| None);