Skip to content

Commit

Permalink
fix: fix panic when the receiver is dropped #2
Browse files Browse the repository at this point in the history
Signed-off-by: Wenxuan Zhang <wenxuangm@gmail.com>
  • Loading branch information
wfxr committed Apr 13, 2024
1 parent 722842e commit 08f0bcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ where
if let Err(e) = &res {
log::error!("Error in iteration({info:?}): {:?}", e);
}
self.res_tx.send(res).expect("send report");
// safe to ignore the error which means the receiver is dropped
let _ = self.res_tx.send(res);
}

/// Run the benchmark.
Expand Down

0 comments on commit 08f0bcd

Please sign in to comment.