()
| 835 | } |
| 836 | |
| 837 | private async initializeSync() { |
| 838 | const syncStatus = await this.syncWrites(); |
| 839 | if (!syncStatus.didSync) { |
| 840 | this.logger.warn( |
| 841 | `Failed to send changes on initialization: ${syncStatus.syncFailureReason}` |
| 842 | ); |
| 843 | } |
| 844 | // Reconnect any queries |
| 845 | for (const [id] of this.queries) { |
| 846 | this.connectQuery(id); |
| 847 | } |
| 848 | } |
| 849 | |
| 850 | // TODO: add an onError handler to gracefully handle errors in message handlers |
| 851 | private onMessageHandler(session: SyncSession) { |
no test coverage detected