fix: crash ExEx task when the ExEx future returns (#7633)

Co-authored-by: Oliver Nordbjerg <onbjerg@users.noreply.github.com>
This commit is contained in:
Abner Zheng
2024-04-14 13:22:23 +08:00
committed by GitHub
parent 4d175cb783
commit aa32f7bfa3

View File

@ -627,7 +627,10 @@ where
// spawn it as a crit task
executor.spawn_critical("exex", async move {
info!(target: "reth::cli", id, "ExEx started");
exex.await.unwrap_or_else(|_| panic!("exex {} crashed", id))
match exex.await {
Ok(_) => panic!("ExEx {id} finished. ExEx's should run indefinitely"),
Err(err) => panic!("ExEx {id} crashed: {err}"),
}
});
});
}