MCPcopy Index your code
hub / github.com/upstash/jstack / close

Method close

packages/jstack-shared/src/socket.ts:53–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 }
52
53 close() {
54 this.ws.close()
55
56 // clear all active subscriptions
57 for (const controller of this.controllers.values()) {
58 controller.abort()
59 }
60 this.controllers.clear()
61
62 // clear all heartbeat timers
63 for (const timers of this.heartbeatTimers.values()) {
64 clearInterval(timers.sender)
65 clearInterval(timers.monitor)
66 }
67 this.heartbeatTimers.clear()
68 }
69
70 off<K extends keyof IncomingEvents & SystemEvents>(event: K, callback?: (data: IncomingEvents[K]) => any): void {
71 return this.emitter.off(event as string, callback)

Callers 2

registerOperationMethod · 0.95
closeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected