From 007150c81898e0591dd3158883b305ffda33fbdf Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 12 Jul 2022 13:07:02 -0400 Subject: [PATCH] fix windows --- veilid-server/src/main.rs | 2 +- veilid-server/src/windows.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/veilid-server/src/main.rs b/veilid-server/src/main.rs index a99b6033..d97b2666 100644 --- a/veilid-server/src/main.rs +++ b/veilid-server/src/main.rs @@ -83,7 +83,7 @@ fn main() -> EyreResult<()> { if settings.read().daemon.enabled { cfg_if! { if #[cfg(windows)] { - return windows::run_service(settings, matches).map_err(|e| format!("{}", e)); + return windows::run_service(settings, matches); } else if #[cfg(unix)] { return unix::run_daemon(settings, matches); } diff --git a/veilid-server/src/windows.rs b/veilid-server/src/windows.rs index e0000e6a..405d5916 100644 --- a/veilid-server/src/windows.rs +++ b/veilid-server/src/windows.rs @@ -1,4 +1,5 @@ use crate::settings::*; +use crate::*; use clap::ArgMatches; use std::ffi::OsString; use std::time::Duration; @@ -11,7 +12,7 @@ use windows_service::*; // Register generated `ffi_service_main` with the system and start the service, blocking // this thread until the service is stopped. -pub fn run_service(settings: Settings, matches: ArgMatches) -> windows_service::Result<()> { +pub fn run_service(settings: Settings, matches: ArgMatches) -> EyreResult<()> { eprintln!("Windows Service mode not implemented yet."); //service_dispatcher::start("veilid-server", ffi_veilid_service_main)?;