MCPcopy Index your code
hub / github.com/simstudioai/sim / onClose

Method onClose

apps/sim/lib/mcp/client.ts:245–251  ·  view source on GitHub ↗

Chains with the SDK's internal onclose handler so its cleanup still runs.

(callback: () => void)

Source from the content-addressed store, hash-verified

243
244 /** Chains with the SDK's internal onclose handler so its cleanup still runs. */
245 onClose(callback: () => void): void {
246 const existingHandler = this.transport.onclose
247 this.transport.onclose = () => {
248 existingHandler?.()
249 callback()
250 }
251 }
252
253 getConfig(): McpServerConfig {
254 return { ...this.config }

Callers 1

connectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected