Repository navigation
fix: 修复 MCP 连接导致退出延迟 - #393
Open
Sakura520222 wants to merge 1 commit into
Open
Sakura520222 wants to merge 1 commit into
Sakura520222 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动类型
是否包含破坏性变更
改动说明
MCP 客户端保留空闲 TCP 连接,或只发送部分 HTTP 请求头/请求体时,应用退出会等待
server.close(),直到客户端超时。停止监听后调用
closeAllConnections(),断开存量连接,再等待 HTTP 服务和 MCP 会话完成清理。生产代码仅修改electron/main/services/mcp/http.ts,另两个文件用于更新 mock 和覆盖三种真实连接。关联 Issue
无
测试情况
基于上游
dev@d37e44b3,Windows 隔离目录验证:pnpm install --frozen-lockfilepnpm typecheck、pnpm lint、pnpm test、pnpm exec electron-vite build全部通过git diff --check通过自查清单