change: mcp tool invoke url path

This commit is contained in:
lilong.129
2025-04-10 11:20:00 +08:00
parent b2dafda155
commit f8a5c25f4b
4 changed files with 9 additions and 4 deletions
+2
View File
@@ -82,6 +82,8 @@ func (h *MCPHub) connectToServer(ctx context.Context, serverName string, config
h.mu.Lock()
defer h.mu.Unlock()
log.Debug().Str("server", serverName).Msg("connecting to MCP server")
// Close existing connection if any
if existing, exists := h.connections[serverName]; exists {
if err := existing.Client.Close(); err != nil {