Skip to content

Conversation

@CodeCasterX
Copy link
Member

  • Added Closeable interface to McpClient to support proper resource cleanup.
  • Implemented close() method in DefaultMcpClient to:
    • Cancel SSE subscription.
    • Shutdown ping scheduler gracefully.
    • Log client closure with context.
  • Added /close endpoint in TestController for testing purposes to trigger client shutdown via HTTP.

This change ensures that the MCP client releases all held resources when no longer needed, improving reliability and preventing leaks.

- Added Closeable interface to McpClient to support proper resource cleanup.
- Implemented close() method in DefaultMcpClient to:
   - Cancel SSE subscription.
   - Shutdown ping scheduler gracefully.
   - Log client closure with context.
- Added /close endpoint in TestController for testing purposes to trigger client shutdown via HTTP.

This change ensures that the MCP client releases all held resources when no longer needed, improving reliability and preventing leaks.
@CodeCasterX CodeCasterX added this to the 3.5.0 milestone May 28, 2025
@CodeCasterX CodeCasterX requested a review from loveTsong May 28, 2025 09:01
@CodeCasterX CodeCasterX self-assigned this May 28, 2025
@CodeCasterX CodeCasterX added this to Nova May 28, 2025
@CodeCasterX CodeCasterX added type: enhancement A general enhancement in: fel Issues in FEL(FIT Expression for LLM) modules labels May 28, 2025
@CodeCasterX CodeCasterX merged commit 6417d6e into ModelEngine-Group:3.5.x May 28, 2025
1 check passed
@github-project-automation github-project-automation bot moved this to Done in Nova May 28, 2025
Yager-42 pushed a commit to Yager-42/fit-framework that referenced this pull request Aug 16, 2025
…odelEngine-Group#144)

- Added Closeable interface to McpClient to support proper resource cleanup.
- Implemented close() method in DefaultMcpClient to:
   - Cancel SSE subscription.
   - Shutdown ping scheduler gracefully.
   - Log client closure with context.
- Added /close endpoint in TestController for testing purposes to trigger client shutdown via HTTP.

This change ensures that the MCP client releases all held resources when no longer needed, improving reliability and preventing leaks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: fel Issues in FEL(FIT Expression for LLM) modules type: enhancement A general enhancement

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant