8000 chore: handle other signals by blva · Pull Request #318 · mongodb-js/mongodb-mcp-server · GitHub
[go: up one dir, main page]

Skip to content

chore: handle other signals #318

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 2 commits into from
Jun 24, 2025
Merged

chore: handle other signals #318

merged 2 commits into from
Jun 24, 2025

Conversation

blva
Copy link
Collaborator
@blva blva commented Jun 24, 2025

closes #279

  • adds support for handling other signals
  • MCP-10

@blva blva marked this pull request as ready for review June 24, 2025 11:12
@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 11:12
@blva blva requested a review from a team as a code owner June 24, 2025 11:12
Copy link
Contributor
@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

Adds a unified shutdown handler and extends signal support to gracefully close the server on SIGTERM and SIGQUIT in addition to SIGINT.

  • Extracts the shutdown logic into a standalone shutdown function
  • Registers shutdown for SIGTERM and SIGQUIT signals
  • Refactors the existing SIGINT listener to use the new shutdown function
Comments suppressed due to low confidence (1)

src/index.ts:50

  • Add tests that simulate SIGINT, SIGTERM, and SIGQUIT to verify the shutdown handler is called, the server closes gracefully, and the process exits with the correct code.
    process.on("SIGINT", shutdown);

@blva blva changed the title MCP-10: handle other signals chore: handle other signals Jun 24, 2025
@blva blva merged commit 70a5f9b into main Jun 24, 2025
19 checks passed
@blva blva deleted the MCP-10 branch June 24, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Docker Container of Mongo MCP Server is not Exiting or Auto Removing
3 participants
0