mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
feat: Change Server::run_forever to take ownership and ensure exit semantics
This commit is contained in:
parent
0de54eb907
commit
b83da0f03e
1 changed files with 2 additions and 2 deletions
|
@ -263,7 +263,7 @@ impl Server {
|
|||
///
|
||||
/// Note: this function may fork the process for daemonization, so any additional threads created
|
||||
/// before this function will be lost to any service logic once this function is called.
|
||||
pub fn run_forever(&mut self) {
|
||||
pub fn run_forever(mut self) -> ! {
|
||||
info!("Server starting");
|
||||
|
||||
let conf = self.configuration.as_ref();
|
||||
|
@ -328,7 +328,7 @@ impl Server {
|
|||
}
|
||||
}
|
||||
info!("All runtimes exited, exiting now");
|
||||
std::process::exit(0);
|
||||
std::process::exit(0)
|
||||
}
|
||||
|
||||
fn create_runtime(name: &str, threads: usize, work_steal: bool) -> Runtime {
|
||||
|
|
Loading…
Reference in a new issue