mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix: request sync before sse connects
(fixes streetwriters/notesnook#465)
This commit is contained in:
@@ -146,6 +146,7 @@ class Database {
|
||||
async connectSSE(args) {
|
||||
await this.sseMutex.runExclusive(async () => {
|
||||
if (args && !!args.error) return;
|
||||
this.eventManager.publish(EVENTS.databaseSyncRequested, true, false);
|
||||
|
||||
const forceReconnect = args && args.force;
|
||||
if (
|
||||
@@ -164,7 +165,6 @@ class Database {
|
||||
|
||||
this.evtSource.onopen = async () => {
|
||||
console.log("SSE: opened channel successfully!");
|
||||
this.eventManager.publish(EVENTS.databaseSyncRequested, true, false);
|
||||
};
|
||||
|
||||
this.evtSource.onerror = function (error) {
|
||||
|
||||
Reference in New Issue
Block a user