optionally skip installing panic hook

For debugging this failure:
https://groups.google.com/g/moonfire-nvr-users/c/2j9LvfFl2u8/m/bWpwFilTCQAJ
This commit is contained in:
Scott Lamb 2021-04-07 22:52:55 -07:00
parent f8d5610e3e
commit 0c34ea8314

View File

@ -155,7 +155,12 @@ fn main() {
.build();
h.clone().install().unwrap();
std::panic::set_hook(Box::new(&panic_hook));
let use_panic_hook = ::std::env::var("MOONFIRE_PANIC_HOOK")
.map(|s| s != "false" && s != "0")
.unwrap_or(true);
if use_panic_hook {
std::panic::set_hook(Box::new(&panic_hook));
}
let r = {
let _a = h.async_scope();