Implement graceful shutdown (#2812)
* Remove stop status mutex * remove some deadlocks * Rewrite stop channel handling * fix deadlock in peers object * add missing test fixes
This commit is contained in:
committed by
Ignotus Peverell
parent
884851cdeb
commit
9ab23f6eef
@@ -199,6 +199,7 @@ impl TUIStatusListener for TUIStatusView {
|
||||
};
|
||||
format!("Downloading blocks: {}%, step 4/4", percent)
|
||||
}
|
||||
SyncStatus::Shutdown => "Shutting down, closing connections".to_string(),
|
||||
}
|
||||
};
|
||||
/*let basic_mining_config_status = {
|
||||
|
||||
+3
-1
@@ -173,8 +173,10 @@ impl Controller {
|
||||
while let Some(message) = self.rx.try_iter().next() {
|
||||
match message {
|
||||
ControllerMessage::Shutdown => {
|
||||
server.stop();
|
||||
self.ui.stop();
|
||||
println!("Shutdown in progress, please wait");
|
||||
server.stop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user