Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix reconnect timer
  • Loading branch information
waleedlatif1 committed Feb 9, 2026
commit 3de6e3b40c4e99aa7f12aeeac4eecd6822e87f69
10 changes: 10 additions & 0 deletions apps/sim/lib/mcp/connection-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class McpConnectionManager {
return { supportsListChanged: false }
}

this.clearReconnectTimer(serverId)

this.connections.set(serverId, client)
this.states.set(serverId, {
serverId,
Expand Down Expand Up @@ -305,6 +307,14 @@ class McpConnectionManager {

if (this.disposed) return

const currentState = this.states.get(serverId)
if (currentState?.connected) {
logger.info(
`[${config.name}] Connection already re-established externally, skipping reconnect`
)
return
}

const attempts = state.reconnectAttempts
this.connections.delete(serverId)
this.states.delete(serverId)
Expand Down