Skip to content

Commit

Permalink
use try_send to understand if the channel is full or disconnected, fo…
Browse files Browse the repository at this point in the history
…r further investigation

Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Oct 6, 2024
1 parent 48b4621 commit d2a240e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/blob/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ impl<P: Progress> TreeStreamerOnce<P> {
let _join_handle = std::thread::spawn(move || {
for (path, id, count) in in_rx {
if let Err(err) = out_tx
.send(Tree::from_backend(&be, &index, id).map(|tree| (path, tree, count)))
.try_send(Tree::from_backend(&be, &index, id).map(|tree| (path, tree, count)))
{
panic!("
Sending tree {id} on channel failed: {err}.
Expand Down

0 comments on commit d2a240e

Please sign in to comment.