1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-02-17 14:43:31 +01: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

@ -1,5 +1,12 @@
# Changes # Changes
## [0.2.6] - Unreleased
### Fixed
* Fix arbiter's thread panic message.
## [0.2.5] - 2019-09-02 ## [0.2.5] - 2019-09-02
### Added ### Added

View File

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