()
| 100 | } |
| 101 | |
| 102 | close(): void { |
| 103 | this.stopped = true |
| 104 | this.socket?.close() |
| 105 | this.socket = null |
| 106 | for (const pending of this.pending.values()) { |
| 107 | pending.reject(new Error("Runtime socket closed")) |
| 108 | } |
| 109 | this.pending.clear() |
| 110 | this.emitStatus("disconnected") |
| 111 | } |
| 112 | |
| 113 | async connect(): Promise<void> { |
| 114 | if (this.socket?.readyState === WebSocket.OPEN) return |
nothing calls this directly
no test coverage detected