Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: log error (as warning) during connection check

thecodrrf1ceecf98297
diff --git a/packages/core/api/sync/index.js b/packages/core/api/sync/index.js
index 0c6a19e0d..3b9b7799a 100644
--- a/packages/core/api/sync/index.js
+++ b/packages/core/api/sync/index.js
@@ -382,11 +382,15 @@ class Sync {
}
async checkConnection() {
- if (this.connection.state !== signalr.HubConnectionState.Connected) {
- if (this.connection.state !== signalr.HubConnectionState.Disconnected)
- await this.connection.stop();
+ try {
+ if (this.connection.state !== signalr.HubConnectionState.Connected) {
+ if (this.connection.state !== signalr.HubConnectionState.Disconnected)
+ await this.connection.stop();
- await this.connection.start();
+ await this.connection.start();
+ }
+ } catch (e) {
+ this.logger.warn(e.message);
}
}
}