MCPcopy Create free account
hub / github.com/codeaashu/claude-code / cleanupConn

Function cleanupConn

src/upstreamproxy/relay.ts:444–455  ·  view source on GitHub ↗
(st: ConnState | undefined)

Source from the content-addressed store, hash-verified

442}
443
444function cleanupConn(st: ConnState | undefined): void {
445 if (!st) return
446 if (st.pinger) clearInterval(st.pinger)
447 if (st.ws && st.ws.readyState <= WebSocket.OPEN) {
448 try {
449 st.ws.close()
450 } catch {
451 // already closing
452 }
453 }
454 st.ws = undefined
455}
456

Callers 4

closeFunction · 0.85
errorFunction · 0.85
startNodeRelayFunction · 0.85
openTunnelFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected