Add files via upload

This commit is contained in:
公明
2026-02-04 01:39:11 +08:00
committed by GitHub
parent 84d54b1ea9
commit 3cbf398636
2 changed files with 41 additions and 31 deletions
+6 -2
View File
@@ -196,9 +196,13 @@ func (m *ExternalMCPManager) StartClient(name string) error {
m.mu.Lock()
delete(m.errors, name)
m.mu.Unlock()
// 延迟再刷新工具数量,避免 SSE/Streamable 连接尚未就绪时立即请求导致 EOF(如值得买等远端
time.Sleep(2 * time.Second)
// 立即刷新工具数量HTTP/stdio 等可马上拿到
m.triggerToolCountRefresh()
// 2 秒后再刷新一次,覆盖 SSE/Streamable 等需稍等就绪的远端
go func() {
time.Sleep(2 * time.Second)
m.triggerToolCountRefresh()
}()
}
}()