()
| 777 | } |
| 778 | |
| 779 | private scheduleHeartbeat() { |
| 780 | if (this.heartbeatTimer) { |
| 781 | this.heartbeatTimer.refresh(); |
| 782 | } else { |
| 783 | this.heartbeatTimer = setTimeout(() => { |
| 784 | this.publish({ |
| 785 | type: MessageType.HEARTBEAT, |
| 786 | }); |
| 787 | }, this._opts.heartbeatInterval); |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | override close() { |
| 792 | this.publish({ |