fix(sync): try to reconnect after network error when getting token (#2502)

Otherwise, if the token request fail, the process will be stopped and we
will never try to reconnect.
This commit is contained in:
Yohan Boniface 2025-02-14 17:22:41 +01:00 committed by GitHub
commit b86db00e88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,9 +72,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) {