From d9e3a40ee4549334ab032d9a3912a760755e85ca Mon Sep 17 00:00:00 2001 From: azivner Date: Fri, 22 Dec 2017 06:48:24 -0500 Subject: [PATCH] during sync login we check that sync server source ID isn't local (can happen after document fork if server is not restarted) --- services/sync.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/sync.js b/services/sync.js index 505451ebe..08eb1026a 100644 --- a/services/sync.js +++ b/services/sync.js @@ -92,6 +92,10 @@ async function login() { hash: hash }); + if (source_id.isLocalSourceId(resp.sourceId)) { + throw new Error(`Sync server has source ID ${resp.sourceId} which is also local. Try restarting sync server.`); + } + syncContext.sourceId = resp.sourceId; return syncContext;