@@ -100,7 +100,6 @@ use mesh::rpc::RpcError;
100100use mesh:: rpc:: RpcSend ;
101101use mesh_worker:: WorkerEvent ;
102102use mesh_worker:: WorkerHandle ;
103- use mesh_worker:: launch_local_worker;
104103use meshworker:: VmmMesh ;
105104use net_backend_resources:: mac_address:: MacAddress ;
106105use pal_async:: DefaultDriver ;
@@ -137,7 +136,6 @@ use storvsp_resources::ScsiPath;
137136use tpm_resources:: TpmDeviceHandle ;
138137use tpm_resources:: TpmRegisterLayout ;
139138use tracing_helpers:: AnyhowValueExt ;
140- use ttrpc:: TtrpcWorker ;
141139use uidevices_resources:: SynthKeyboardHandle ;
142140use uidevices_resources:: SynthMouseHandle ;
143141use uidevices_resources:: SynthVideoHandle ;
@@ -1789,8 +1787,9 @@ fn do_main() -> anyhow::Result<()> {
17891787 return console_relay:: relay_console ( & path, console_title. as_str ( ) ) ;
17901788 }
17911789
1790+ #[ cfg( any( feature = "grpc" , feature = "ttrpc" ) ) ]
17921791 if let Some ( path) = opt. ttrpc . as_ref ( ) . or ( opt. grpc . as_ref ( ) ) {
1793- block_on ( async {
1792+ return block_on ( async {
17941793 let _ = std:: fs:: remove_file ( path) ;
17951794 let listener =
17961795 unix_socket:: UnixListener :: bind ( path) . context ( "failed to bind to socket" ) ?;
@@ -1802,11 +1801,12 @@ fn do_main() -> anyhow::Result<()> {
18021801 } ;
18031802
18041803 // This is a local launch
1805- let mut handle = launch_local_worker :: < TtrpcWorker > ( ttrpc:: Parameters {
1806- listener,
1807- transport,
1808- } )
1809- . await ?;
1804+ let mut handle =
1805+ mesh_worker:: launch_local_worker :: < ttrpc:: TtrpcWorker > ( ttrpc:: Parameters {
1806+ listener,
1807+ transport,
1808+ } )
1809+ . await ?;
18101810
18111811 tracing:: info!( %transport, path = %path. display( ) , "listening" ) ;
18121812
@@ -1816,15 +1816,15 @@ fn do_main() -> anyhow::Result<()> {
18161816 handle. join ( ) . await ?;
18171817
18181818 Ok ( ( ) )
1819- } )
1820- } else {
1821- DefaultPool :: run_with ( async |driver| {
1822- let mesh = VmmMesh :: new ( & driver, opt. single_process ) ?;
1823- let result = run_control ( & driver, & mesh, opt) . await ;
1824- mesh. shutdown ( ) . await ;
1825- result
1826- } )
1819+ } ) ;
18271820 }
1821+
1822+ DefaultPool :: run_with ( async |driver| {
1823+ let mesh = VmmMesh :: new ( & driver, opt. single_process ) ?;
1824+ let result = run_control ( & driver, & mesh, opt) . await ;
1825+ mesh. shutdown ( ) . await ;
1826+ result
1827+ } )
18281828}
18291829
18301830fn maybe_with_radix_u64 ( s : & str ) -> Result < u64 , String > {
0 commit comments