Bug 505906: Don't do a last POST if there is nothing left to send. Regression from bug 481347. r=mardak

This commit is contained in:
Dan Mills 2009-07-22 17:48:47 -07:00
Родитель ac355ae207
Коммит 54314c829e
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -486,12 +486,14 @@ SyncEngine.prototype = {
}
// final upload
this._log.info("Uploading " +
(count >= MAX_UPLOAD_RECORDS? "last batch of " : "") +
count + " records, and " + metaCount + " index/depth records");
up.post();
if (up.data.modified > this.lastSync)
this.lastSync = up.data.modified;
if ((count % MAX_UPLOAD_RECORDS) + metaCount > 0) {
this._log.info("Uploading " +
(count >= MAX_UPLOAD_RECORDS? "last batch of " : "") +
count + " records, and " + metaCount + " index/depth records");
up.post();
if (up.data.modified > this.lastSync)
this.lastSync = up.data.modified;
}
}
this._tracker.clearChangedIDs();
},