proxmox-rest-server: allow to catch SIGINT and SIGHUP separately

And make ServerState private.
This commit is contained in:
Dietmar Maurer committed 2021-09-30 08:41:30 +02:00
1 parent 11148dce43
commit fd1b65cc3c
4 files changed
+20 -17

No files matched your search

+2 -1
View File
@@ -127,7 +127,8 @@ async fn run() -> Result<(), Error> {
let init_result: Result<(), Error> = try_block!({
proxmox_rest_server::register_task_control_commands(&mut commando_sock)?;
commando_sock.spawn()?;
proxmox_rest_server::catch_shutdown_and_reload_signals()?;
proxmox_rest_server::catch_shutdown_signal()?;
proxmox_rest_server::catch_reload_signal()?;
Ok(())
});
+2 -1
View File
@@ -270,7 +270,8 @@ async fn run() -> Result<(), Error> {
let init_result: Result<(), Error> = try_block!({
proxmox_rest_server::register_task_control_commands(&mut commando_sock)?;
commando_sock.spawn()?;
proxmox_rest_server::catch_shutdown_and_reload_signals()?;
proxmox_rest_server::catch_shutdown_signal()?;
proxmox_rest_server::catch_reload_signal()?;
Ok(())
});