Tyler Mailman
cc96f379ba
feat(service): add close() method for graceful connection shutdown ( #588 )
...
This PR primarily fixes #572 by enabling graceful shutdown without consuming self. While implementing this, I noticed delete_session() is spawned as a background task, which means close() may return before HTTP session cleanup completes. Since this is part of the same shutdown lifecycle and can cause resource leaks/races, I'm including a small, localized fix to ensure cleanup is completed before close() returns. If maintainers prefer, I can split the cleanup timing change into a follow-up PR.
Changes:
- Add close(&mut self) for graceful shutdown without consuming
- Add close_with_timeout() for bounded shutdown operations
- Add is_closed() to check connection state
- Move HTTP delete_session from background spawn to inline cleanup
- Add 5-second timeout on session cleanup to prevent indefinite hangs
- Add Drop impl with debug log if dropped without explicit close
Fixes #572
2026-01-13 16:25:06 -05:00
..
common
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_deserialization
fix(test): fix tool deserialization error ( #68 )
2025-03-31 13:05:35 +08:00
test_message_schema
feat(elicitation): implement SEP-1330 Elicitation Enum Schema Improvements ( #539 )
2025-12-24 13:54:20 -05:00
test_with_js
refactor: provide http server as tower service ( #228 )
2025-05-28 19:21:40 +08:00
test_with_python
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_close_connection.rs
feat(service): add close() method for graceful connection shutdown ( #588 )
2026-01-13 16:25:06 -05:00
test_completion.rs
feat: implement context-aware completion (MCP 2025-06-18) ( #396 )
2025-09-08 14:44:49 +08:00
test_complex_schema.rs
fix(shemars): use JSON Schema 2020-12 as Default Dialect ( #549 )
2025-11-19 09:55:39 +08:00
test_custom_request.rs
feat: add support for custom requests ( #590 )
2025-12-18 12:41:06 -05:00
test_deserialization.rs
fix(test): fix tool deserialization error ( #68 )
2025-03-31 13:05:35 +08:00
test_elicitation.rs
feat(elicitation): implement SEP-1330 Elicitation Enum Schema Improvements ( #539 )
2025-12-24 13:54:20 -05:00
test_embedded_resource_meta.rs
Spec conformance: meta support and spec updates ( #415 )
2025-09-04 14:23:36 -04:00
test_json_schema_detection.rs
refactor: merge cached_schema_for_type into schema_for_type ( #581 )
2025-12-09 20:04:52 -05:00
test_logging.rs
test(context): test context request handling and refactor for reusable client-server tests ( #97 )
2025-04-07 10:13:05 +08:00
test_message_protocol.rs
feat: extensions to context ( #102 )
2025-04-08 10:01:17 +08:00
test_message_schema.rs
chore(deps): update schemars requirement from 0.8 to 1.0 ( #258 )
2025-07-11 11:15:45 +08:00
test_notification.rs
feat: add support for custom server notifications ( #580 )
2025-12-16 12:48:03 -05:00
test_progress_subscriber.rs
feat(task): add task support (SEP-1686) ( #536 )
2025-12-22 09:01:00 -05:00
test_prompt_handler.rs
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_prompt_macro_annotations.rs
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_prompt_macros.rs
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_prompt_routers.rs
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_resource_link.rs
feat: add resource_link support to tools and prompts ( #381 )
2025-08-29 18:13:38 +08:00
test_resource_link_integration.rs
feat: add resource_link support to tools and prompts ( #381 )
2025-08-29 18:13:38 +08:00
test_sampling.rs
example: add simpling example and test ( #289 )
2025-06-30 18:18:23 +08:00
test_streamable_http_priming.rs
Implement SEP-1699: Support SSE Polling via Server-Side Disconnect ( #604 )
2026-01-09 13:22:57 -05:00
test_structured_output.rs
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_task.rs
feat(task): add task support (SEP-1686) ( #536 )
2025-12-22 09:01:00 -05:00
test_tool_builder_methods.rs
feat: Add support for Tool.outputSchema and CallToolResult.structuredContent ( #316 )
2025-07-31 16:32:24 +08:00
test_tool_handler.rs
Move whole rmcp crate to offcial rust sdk ( #44 )
2025-03-27 17:33:41 -04:00
test_tool_macro_annotations.rs
refactor: refactor tool macros and router implementation ( #261 )
2025-06-24 04:01:22 +08:00
test_tool_macros.rs
feat(task): add task support (SEP-1686) ( #536 )
2025-12-22 09:01:00 -05:00
test_tool_result_meta.rs
feat(rmcp): add optional _meta to CallToolResult, EmbeddedResource, and ResourceContents ( #386 )
2025-09-02 13:47:09 -04:00
test_tool_routers.rs
feat: Add prompt support ( #351 )
2025-08-21 11:22:19 +08:00
test_with_js.rs
Implement SEP-1699: Support SSE Polling via Server-Side Disconnect ( #604 )
2026-01-09 13:22:57 -05:00
test_with_python.rs
feat!: remove SSE transport support ( #562 )
2025-12-01 20:40:13 -05:00