diff --git a/umap/static/umap/js/modules/sync/engine.js b/umap/static/umap/js/modules/sync/engine.js index 62106352..640ae5f4 100644 --- a/umap/static/umap/js/modules/sync/engine.js +++ b/umap/static/umap/js/modules/sync/engine.js @@ -71,9 +71,11 @@ export class SyncEngine { }) const [response, _, error] = await this._umap.server.get(websocketTokenURI) - if (!error) { - this.start(response.token) + if (error) { + this.reconnect() + return } + this.start(response.token) } start(authToken) {