Skip to content

Commit 35263db

Browse files
changes from review
1 parent bc4f738 commit 35263db

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

crates/core/src/host/v8/mod.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,25 +1707,22 @@ where
17071707
let (hooks, module_common) = match startup_result {
17081708
Err(_) => {
17091709
if let Some(result_tx) = startup_result_tx.take() {
1710-
let _ = result_tx
1710+
if result_tx
17111711
.send(Err(anyhow::anyhow!("JS worker panicked during startup")))
1712-
.inspect_err(|_| {
1713-
// This should never happen as we immediately `.recv` on the
1714-
// other end of the channel, but sometimes it gets cancelled.
1715-
log::error!("startup result receiver disconnected");
1716-
});
1712+
.is_err()
1713+
{
1714+
log::error!("startup result receiver disconnected");
1715+
}
17171716
} else {
17181717
log::error!("JS worker panicked while recreating isolate");
17191718
}
17201719
return;
17211720
}
17221721
Ok(Err(err)) => {
17231722
if let Some(result_tx) = startup_result_tx.take() {
1724-
let _ = result_tx.send(Err(err)).inspect_err(|_| {
1725-
// This should never happen as we immediately `.recv` on the
1726-
// other end of the channel, but sometimes it gets cancelled.
1723+
if result_tx.send(Err(err)).is_err() {
17271724
log::error!("startup result receiver disconnected");
1728-
});
1725+
}
17291726
} else {
17301727
log::error!("failed to restart JS worker: {err:#}");
17311728
}

0 commit comments

Comments
 (0)