MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / close

Method close

packages/server-e2e/src/client.ts:441–455  ·  view source on GitHub ↗

Close the socket. Idempotent.

()

Source from the content-addressed store, hash-verified

439
440 /** Close the socket. Idempotent. */
441 async close(): Promise<void> {
442 for (const dispose of this._disposers.splice(0)) {
443 try {
444 dispose();
445 } catch {
446 // ignore
447 }
448 }
449 if (this._ws) {
450 await this._ws.close();
451 this._ws = null;
452 }
453 this._serverHello = null;
454 this._subscribed.clear();
455 }
456
457 // ── WS observation ──────────────────────────────────────────────────────
458 /** Subscribe to ALL incoming frames. Returns an unsubscribe handle. */

Callers 13

mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 3

closeMethod · 0.65
clearMethod · 0.65
disposeFunction · 0.50

Tested by

no test coverage detected