File tree Expand file tree Collapse file tree
crates/devolutions-pedm/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,14 +36,21 @@ impl Task for PedmTask {
3636 const NAME : & ' static str = "devolutions-pedm" ;
3737
3838 async fn run ( self , mut shutdown_signal : ShutdownSignal ) -> anyhow:: Result < ( ) > {
39- select ! {
40- res = api:: serve( r"\\.\pipe\DevolutionsPEDM" , None ) => {
41- if let Err ( e) = & res {
42- error!( %e, "Named pipe server got error" ) ;
39+ cfg_if:: cfg_if! {
40+ if #[ cfg( target_os = "windows" ) ] {
41+ select! {
42+ res = api:: serve( r"\\.\pipe\DevolutionsPEDM" , None ) => {
43+ if let Err ( e) = & res {
44+ error!( %e, "Named pipe server got error" ) ;
45+ }
46+ res. map_err( Into :: into)
47+ }
48+ _ = shutdown_signal. wait( ) => {
49+ Ok ( ( ) )
50+ }
4351 }
44- res. map_err( Into :: into)
45- }
46- _ = shutdown_signal. wait( ) => {
52+ } else {
53+ shutdown_signal. wait( ) . await ;
4754 Ok ( ( ) )
4855 }
4956 }
You can’t perform that action at this time.
0 commit comments