8000 fix: handle parent process exit to ensure MCP Server shutdown by cfc4n · Pull Request #33 · gojue/moling · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: handle parent process exit to ensure MCP Server shutdown #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

cfc4n
Copy link
Member
@cfc4n cfc4n commented Apr 22, 2025

When the Claude Desktop process exits, it does not send the syscall.SIGTERM signal to the MoLing MCP Server, causing MoLing to be unable to exit.

Other MCP Clients do not have this issue, for example, Cherry Studio operates normally.

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n added the bug Something isn't working label Apr 22, 2025
@cfc4n cfc4n linked an issue Apr 22, 2025 that may be closed by this pull request
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 22, 2025
@cfc4n cfc4n requested a review from Copilot April 22, 2025 14:04
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the MCP Server fails to shut down when the Claude Desktop process exits by adding a goroutine that monitors the parent process and signals shutdown.

  • Added a goroutine to periodically check for parent process exit
  • Sends a SIGTERM signal to trigger MCP Server shutdown when the parent process is detected as exited

@cfc4n cfc4n merged commit f13951d into master Apr 22, 2025
6 checks passed
@cfc4n cfc4n deleted the claude-closed-moling-cannot-exit branch April 22, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After Claude Desktop is closed, the moling MCP server cannot exit normally
1 participant
0