()
| 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) |
no outgoing calls
no test coverage detected