mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-10 06:35:01 -05:00
fix reconnect timer
This commit is contained in:
@@ -125,6 +125,8 @@ class McpConnectionManager {
|
||||
return { supportsListChanged: false }
|
||||
}
|
||||
|
||||
this.clearReconnectTimer(serverId)
|
||||
|
||||
this.connections.set(serverId, client)
|
||||
this.states.set(serverId, {
|
||||
serverId,
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user