1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-27 06:09:02 +02:00

fix arbiter thread panic message

This commit is contained in:
Nikolay Kim
2019-10-14 11:19:08 +06:00
parent 0b0060fe47
commit 115e82329f
2 changed files with 10 additions and 1 deletions

View File

@ -260,9 +260,11 @@ struct ArbiterController {
impl Drop for ArbiterController {
fn drop(&mut self) {
if thread::panicking() {
eprintln!("Panic in Arbiter thread, shutting down system.");
if System::current().stop_on_panic() {
eprintln!("Panic in Arbiter thread, shutting down system.");
System::current().stop_with_code(1)
} else {
eprintln!("Panic in Arbiter thread.");
}
}
}