MCPcopy
hub / github.com/tldraw/tldraw / close

Method close

packages/sync-core/src/lib/TLSyncRoom.ts:211–217  ·  view source on GitHub ↗

* Close the room and clean up all resources. Disconnects all sessions * and stops background processes.

()

Source from the content-addressed store, hash-verified

209 * and stops background processes.
210 */
211 close() {
212 this.disposables.forEach((d) => d())
213 this.sessions.forEach((session) => {
214 session.socket.close()
215 })
216 this._isClosed = true
217 }
218
219 /**
220 * Check if the room has been closed and is no longer accepting connections.

Callers 1

makeRoomFunction · 0.95

Calls 2

closeMethod · 0.65
forEachMethod · 0.45

Tested by 1

makeRoomFunction · 0.76