Skip to content

Commit 427a18b

Browse files
authored
Improves panic message if send() fails in streaming_unpack_snapshot() (#2459)
1 parent 72d8341 commit 427a18b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

accounts-db/src/hardened_unpack.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,13 @@ pub fn streaming_unpack_snapshot<A: Read>(
339339
|_, _| {},
340340
|entry_path_buf| {
341341
if entry_path_buf.is_file() {
342-
sender.send(entry_path_buf).unwrap();
342+
let result = sender.send(entry_path_buf);
343+
if let Err(err) = result {
344+
panic!(
345+
"failed to send path '{}' from unpacker to rebuilder: {err}",
346+
err.0.display(),
347+
);
348+
}
343349
}
344350
},
345351
)

0 commit comments

Comments
 (0)