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

Method close

apps/sim/lib/copilot/request/session/writer.ts:113–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 }
112
113 async close(): Promise<void> {
114 this.stopKeepalive()
115 this.clearFlushTimer()
116 await this.flush()
117 if (!this.controller) return
118 try {
119 this.controller.close()
120 } catch {
121 // Controller already closed
122 }
123 this.controller = null
124 }
125
126 private enqueue(envelope: PersistedStreamEventEnvelope): void {
127 if (this._clientDisconnected || !this.controller) return

Callers

nothing calls this directly

Calls 4

stopKeepaliveMethod · 0.95
clearFlushTimerMethod · 0.95
flushMethod · 0.95
closeMethod · 0.65

Tested by

no test coverage detected