diff --git a/src/server/mod.rs b/src/server/mod.rs index 811e7cf..81b98fa 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -34,7 +34,14 @@ pub fn init(data_paths: DataPaths, server_parameters: ServerParameters) { } info!("Found PID file at {pid_file_path:?}, overwriting..."); } - let pid_file = qpidfile::Pidfile::new(pid_file_path).unwrap(); + let pid_file = match qpidfile::Pidfile::new(&pid_file_path) { + Ok(pidfile) => pidfile, + Err(e) => { + error!("Failed to create PID file at {}", pid_file_path.display()); + error!("{}", e); + return; + } + }; let runtime = match tokio::runtime::Runtime::new() { Err(e) => {