зеркало из https://github.com/mozilla/gecko-dev.git
don't fail on invalid server deltas which don't apply to the local snapshot; wipe the local snapshot instead
This commit is contained in:
Родитель
22b777ce83
Коммит
ecd1ab657d
|
@ -571,9 +571,17 @@ Engine.prototype = {
|
|||
break;
|
||||
}
|
||||
|
||||
for (var i = 0; i < deltas.length; i++) {
|
||||
snap.applyCommands.async(snap, self.cb, deltas[i]);
|
||||
yield;
|
||||
try {
|
||||
for (var i = 0; i < deltas.length; i++) {
|
||||
snap.applyCommands.async(snap, self.cb, deltas[i]);
|
||||
yield;
|
||||
}
|
||||
} catch (e) {
|
||||
this._log.error("Error applying remote deltas to saved snapshot");
|
||||
this._log.error("Clearing local snapshot; next sync will merge");
|
||||
this._log.debug("Exception: " + Utils.exceptionStr(e));
|
||||
this._log.trace("Stack:\n" + Utils.stackTrace(e));
|
||||
this._snapshot.wipe();
|
||||
}
|
||||
|
||||
ret.status = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче