Skip to content

implement graceful shutdown for Puma server#21441

Open
dwelch-r7 wants to merge 1 commit into
rapid7:masterfrom
dwelch-r7:puma-graceful-shutdown
Open

implement graceful shutdown for Puma server#21441
dwelch-r7 wants to merge 1 commit into
rapid7:masterfrom
dwelch-r7:puma-graceful-shutdown

Conversation

@dwelch-r7
Copy link
Copy Markdown
Contributor

While working on #21297 I noticed that puma wasn't shutting down gracefully so I created this PR to address that issue separately

Refactors the way the MCP server starts and stops its HTTP transport by switching from using Rack's Puma handler to directly managing Puma via its server API. This allows for more graceful shutdowns and better control over the server lifecycle. The test suite is updated accordingly to mock and verify the new Puma integration and shutdown behavior.

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Comment on lines +148 to +150
@puma_log_io&.close
@puma_log_io = nil
@puma_launcher = nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants