mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-09-01 20:13:19 +02:00
Resolves race condition where multiple parallel requests through FastMCP proxy to stdio servers would fail with 'Received request before initialization was complete' errors. The issue occurred because each proxy operation created a new client that tried to initialize simultaneously. Added _SynchronizedClientContext to serialize stdio client initialization using asyncio semaphore while preserving performance for non-stdio transports. - Added _SynchronizedClientContext async context manager - Enhanced ProxyManagerMixin with synchronized client context - Updated all proxy managers to use synchronized context for stdio - Added comprehensive tests with 20+ parallel operations - All existing tests continue to pass Co-authored-by: William Easton <strawgate@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| auth | ||
| http | ||
| middleware | ||
| openapi | ||
| proxy | ||
| __init__.py | ||
| test_app_state.py | ||
| test_auth_integration.py | ||
| test_context.py | ||
| test_experimental_openapi_feature_flag.py | ||
| test_file_server.py | ||
| test_import_server.py | ||
| test_logging.py | ||
| test_mount.py | ||
| test_resource_prefix_formats.py | ||
| test_run_server.py | ||
| test_server.py | ||
| test_server_interactions.py | ||
| test_streamable_http_no_redirect.py | ||
| test_tool_annotations.py | ||
| test_tool_exclude_args.py | ||
| test_tool_transformation.py | ||