Skip to content

Commit

Permalink
v2.0: Improves panic message if send() fails in streaming_unpack_snap…
Browse files Browse the repository at this point in the history
…shot() (backport of #2459) (#2464)

Improves panic message if send() fails in streaming_unpack_snapshot() (#2459)

(cherry picked from commit 427a18b)

Co-authored-by: Brooks <[email protected]>
  • Loading branch information
mergify[bot] and brooksprumo authored Aug 16, 2024
1 parent 530b475 commit 377d19d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion accounts-db/src/hardened_unpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ pub fn streaming_unpack_snapshot<A: Read>(
|_, _| {},
|entry_path_buf| {
if entry_path_buf.is_file() {
sender.send(entry_path_buf).unwrap();
let result = sender.send(entry_path_buf);
if let Err(err) = result {
panic!(
"failed to send path '{}' from unpacker to rebuilder: {err}",
err.0.display(),
);
}
}
},
)
Expand Down

0 comments on commit 377d19d

Please sign in to comment.