fix(xo-server/remotes): dont sync unnecessarily

This commit is contained in:
Julien Fontanet
2019-03-27 10:04:01 +01:00
parent 56636bf5d4
commit 9f6fc785bc

View File

@@ -68,14 +68,14 @@ export default class {
let handler = handlers[id]
if (handler === undefined) {
handler = handlers[id] = getHandler(remote, this._remoteOptions)
}
try {
await handler.sync()
ignoreErrors.call(this._updateRemote(id, { error: '' }))
} catch (error) {
ignoreErrors.call(this._updateRemote(id, { error: error.message }))
throw error
try {
await handler.sync()
ignoreErrors.call(this._updateRemote(id, { error: '' }))
} catch (error) {
ignoreErrors.call(this._updateRemote(id, { error: error.message }))
throw error
}
}
return handler