mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix(sync): try to reconnect after network error when getting token
This commit is contained in:
parent
815ff046ff
commit
1ce491a70c
1 changed files with 4 additions and 2 deletions
|
@ -71,9 +71,11 @@ export class SyncEngine {
|
||||||
})
|
})
|
||||||
|
|
||||||
const [response, _, error] = await this._umap.server.get(websocketTokenURI)
|
const [response, _, error] = await this._umap.server.get(websocketTokenURI)
|
||||||
if (!error) {
|
if (error) {
|
||||||
this.start(response.token)
|
this.reconnect()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
this.start(response.token)
|
||||||
}
|
}
|
||||||
|
|
||||||
start(authToken) {
|
start(authToken) {
|
||||||
|
|
Loading…
Reference in a new issue