@vrtmrz/livesync-commonlib 0.1.12 → 0.1.14-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/replication/couchdb/LiveSyncReplicator.d.ts +1 -0
- package/dist/replication/couchdb/LiveSyncReplicator.js +263 -214
- package/dist/services/base/RemoteService.js +6 -0
- package/dist/worker/bgWorker.js +1 -1
- package/docs/development.md +1 -0
- package/package.json +1275 -4
|
@@ -203,6 +203,12 @@ class RemoteService extends ServiceBase {
|
|
|
203
203
|
const exMsg = ex instanceof Error ? ex : LiveSyncError.fromError(ex);
|
|
204
204
|
const msg = `${exMsg.name}:${exMsg.message}`;
|
|
205
205
|
this._log(ex, LOG_LEVEL_VERBOSE);
|
|
206
|
+
try {
|
|
207
|
+
await db.close();
|
|
208
|
+
} catch (closeError) {
|
|
209
|
+
this._log("Failed to close remote database after connection failure.", LOG_LEVEL_INFO);
|
|
210
|
+
this._log(closeError, LOG_LEVEL_VERBOSE);
|
|
211
|
+
}
|
|
206
212
|
return msg;
|
|
207
213
|
}
|
|
208
214
|
}
|