Skip to content

fix: exit server process when client disconnects#128

Closed
devjiwonchoi wants to merge 1 commit intomainfrom
jiwon-2026-03-22/fix-server-cleanup-on-disconnect
Closed

fix: exit server process when client disconnects#128
devjiwonchoi wants to merge 1 commit intomainfrom
jiwon-2026-03-22/fix-server-cleanup-on-disconnect

Conversation

@devjiwonchoi
Copy link
Copy Markdown
Member

Summary

  • Add transport.onclose handler to exit the server when the MCP client closes its stdio connection
  • Prevents orphaned next-devtools-mcp processes from accumulating (~140-160MB each)
  • SIGINT/SIGTERM handlers only fire on explicit signals, not when a client simply disconnects its stdio pipes

Add transport.onclose handler so the server exits when the MCP client
closes its stdio connection, preventing orphaned processes from
accumulating.
@devjiwonchoi devjiwonchoi deleted the jiwon-2026-03-22/fix-server-cleanup-on-disconnect branch March 23, 2026 14:00
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.

1 participant