File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -792,6 +792,7 @@ pub extern "C" fn mcp_list_tools_init() -> usize {
792792 // Use spawn_blocking to run a blocking task that calls block_on
793793 // This ensures the reactor is running when async code executes (Windows fix)
794794 std:: thread:: spawn ( move || {
795+ let _guard = runtime_handle. enter ( ) ; // Enter runtime context first
795796 runtime_handle. block_on ( async move {
796797 let service_guard = service_arc. lock ( ) . await ;
797798 if let Some ( service) = service_guard. as_ref ( ) {
@@ -880,6 +881,7 @@ pub extern "C" fn mcp_call_tool_init(tool_name: *const c_char, arguments: *const
880881 // Use spawn_blocking to run a blocking task that calls block_on
881882 // This ensures the reactor is running when async code executes (Windows fix)
882883 std:: thread:: spawn ( move || {
884+ let _guard = runtime_handle. enter ( ) ; // Enter runtime context first
883885 runtime_handle. block_on ( async move {
884886 let service_guard = service_arc. lock ( ) . await ;
885887 if let Some ( service) = service_guard. as_ref ( ) {
You can’t perform that action at this time.
0 commit comments