()
| 145 | } |
| 146 | |
| 147 | disconnect(): void { |
| 148 | this.closed = true; |
| 149 | clearTimeout(this.reconnectTimer); |
| 150 | this.eventSource?.close(); |
| 151 | this.eventSource = null; |
| 152 | } |
| 153 | |
| 154 | private scheduleReconnect(): void { |
| 155 | if (this.closed || this.reconnectAttempts >= this.maxReconnects) { |