Skip to content

Commit

Permalink
receive: really close and forget on synchronization lost (possibly fi…
Browse files Browse the repository at this point in the history
…x issue ANSSI-FR#4 also)
  • Loading branch information
github-af committed Jan 22, 2025
1 parent a3a3368 commit 943b80b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/receive/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ pub(crate) fn start<F>(receiver: &receive::Receiver<F>) -> Result<(), receive::E
}

failed_transfers.insert(client_id);
ended_transfers.insert(client_id, client_sendq);
}
active_transfers = BTreeMap::new();
continue;
Expand Down
3 changes: 2 additions & 1 deletion src/receive/reordering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pub(crate) fn start<F>(receiver: &receive::Receiver<F>) -> 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);
Expand Down

0 comments on commit 943b80b

Please sign in to comment.