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 (#2502)
Otherwise, if the token request fail, the process will be stopped and we will never try to reconnect.
This commit is contained in:
commit
b86db00e88
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue