Ensures MCP subprocess connections are closed when the messaging gateway shuts down, preventing orphan processes.