mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-22 11:52:03 +03:00
Merge pull request #9546 from bc547-dev/master
Make autoSync more robust for network errors
This commit is contained in:
commit
8f68105460
@ -184,6 +184,7 @@ export class ConfigSyncService {
|
||||
|
||||
private async autoSync () {
|
||||
while (true) {
|
||||
try {
|
||||
if (this.isEnabled() && this.config.store.configSync.auto) {
|
||||
const cfg = await this.getConfig(this.config.store.configSync.configID)
|
||||
if (new Date(cfg.modified_at) > this.lastRemoteChange) {
|
||||
@ -192,6 +193,9 @@ export class ConfigSyncService {
|
||||
this.lastRemoteChange = new Date(cfg.modified_at)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.debug('Recovering from autoSync network error')
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 60000))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user