Skip to content

Commit

Permalink
Don’t try to delete a broken RRDP archive twice during cleanup. (#956)
Browse files Browse the repository at this point in the history
This PR fixes an issue where the RRDP collector tried to delete a corrupt
archive twice during cleanup resulting in a fatal error.
  • Loading branch information
partim authored May 1, 2024
1 parent bf9ee15 commit 763d971
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/collector/rrdp/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,12 @@ impl<'a> Run<'a> {
entry_path.clone(), retain
) {
Ok(some) => some,
Err(err) if err.should_retry() => false,
Err(err) if err.should_retry() => {
// The RrdpArchive code has deleted the file already
// in this case, so we mustn’t do it again, so we
// pretend we want to keep it.
true
}
Err(_) => return Err(Fatal),
};
if !keep {
Expand Down

0 comments on commit 763d971

Please sign in to comment.