()
| 566 | } |
| 567 | |
| 568 | close(): void { |
| 569 | // Clear any pending reconnection timer |
| 570 | if (this.reconnectTimer) { |
| 571 | clearTimeout(this.reconnectTimer) |
| 572 | this.reconnectTimer = null |
| 573 | } |
| 574 | |
| 575 | // Clear ping and keepalive intervals |
| 576 | this.stopPingInterval() |
| 577 | this.stopKeepaliveInterval() |
| 578 | |
| 579 | // Unregister session activity callback |
| 580 | unregisterSessionActivityCallback() |
| 581 | |
| 582 | this.state = 'closing' |
| 583 | this.doDisconnect() |
| 584 | } |
| 585 | |
| 586 | private replayBufferedMessages(lastId: string): void { |
| 587 | const messages = this.messageBuffer.toArray() |
no test coverage detected