MCPcopy Create free account
hub / github.com/Noumena-Network/code / close

Method close

src/cli/transports/WebSocketTransport.ts:568–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566 }
567
568 close(): void {
569 // Clear any pending reconnection timer
570 if (this.reconnectTimer) {
571 clearTimeout(this.reconnectTimer)
572 this.reconnectTimer = null
573 }
574
575 // Clear ping and keepalive intervals
576 this.stopPingInterval()
577 this.stopKeepaliveInterval()
578
579 // Unregister session activity callback
580 unregisterSessionActivityCallback()
581
582 this.state = 'closing'
583 this.doDisconnect()
584 }
585
586 private replayBufferedMessages(lastId: string): void {
587 const messages = this.messageBuffer.toArray()

Callers 1

doDisconnectMethod · 0.45

Calls 4

stopPingIntervalMethod · 0.95
stopKeepaliveIntervalMethod · 0.95
doDisconnectMethod · 0.95

Tested by

no test coverage detected