File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -246,16 +246,7 @@ pub struct McpClient {
246246/// Returns NULL on error
247247#[ no_mangle]
248248pub extern "C" fn mcp_client_new ( ) -> * mut McpClient {
249- // On Windows, use current-thread runtime for better compatibility
250- let runtime_result = if cfg ! ( windows) {
251- tokio:: runtime:: Builder :: new_current_thread ( )
252- . enable_all ( )
253- . build ( )
254- } else {
255- tokio:: runtime:: Runtime :: new ( )
256- } ;
257-
258- match runtime_result {
249+ match tokio:: runtime:: Runtime :: new ( ) {
259250 Ok ( runtime) => {
260251 let client = Box :: new ( McpClient {
261252 runtime,
@@ -333,15 +324,8 @@ pub extern "C" fn mcp_connect(
333324 } ;
334325
335326 // Create a new McpClient with runtime
336- // On Windows, use current-thread runtime for better compatibility
337327 let new_client = McpClient {
338- runtime : match if cfg ! ( windows) {
339- tokio:: runtime:: Builder :: new_current_thread ( )
340- . enable_all ( )
341- . build ( )
342- } else {
343- tokio:: runtime:: Runtime :: new ( )
344- } {
328+ runtime : match tokio:: runtime:: Runtime :: new ( ) {
345329 Ok ( r) => r,
346330 Err ( e) => {
347331 let error = format ! ( r#"{{"error": "Failed to create runtime: {}"}}"# , e) ;
You can’t perform that action at this time.
0 commit comments