File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -788,9 +788,8 @@ pub extern "C" fn mcp_list_tools_init() -> usize {
788788 // Clone the Arc to share the service across async boundaries
789789 let service_arc = client. service . clone ( ) ;
790790
791- // Use the client's runtime handle to spawn the task (Windows compatible)
792- let handle = client. runtime . handle ( ) . clone ( ) ;
793- handle. spawn ( async move {
791+ // Spawn directly on the runtime (Windows compatible)
792+ client. runtime . spawn ( async move {
794793 let service_guard = service_arc. lock ( ) . await ;
795794 if let Some ( service) = service_guard. as_ref ( ) {
796795 match service. list_tools ( None ) . await {
@@ -873,9 +872,8 @@ pub extern "C" fn mcp_call_tool_init(tool_name: *const c_char, arguments: *const
873872 if let Some ( client) = client_opt. as_ref ( ) {
874873 let service_arc = client. service . clone ( ) ;
875874
876- // Use the client's runtime handle to spawn the task (Windows compatible)
877- let handle = client. runtime . handle ( ) . clone ( ) ;
878- handle. spawn ( async move {
875+ // Spawn directly on the runtime (Windows compatible)
876+ client. runtime . spawn ( async move {
879877 let service_guard = service_arc. lock ( ) . await ;
880878 if let Some ( service) = service_guard. as_ref ( ) {
881879 // Parse arguments
You can’t perform that action at this time.
0 commit comments