Stop storage requests on shutdown
This commit is contained in:
parent
9920a845c6
commit
fffa1badd4
3 changed files with 4 additions and 2 deletions
|
@ -282,7 +282,7 @@ Zotero.Sync.Storage.Engine.prototype.start = Zotero.Promise.coroutine(function*
|
|||
|
||||
|
||||
Zotero.Sync.Storage.Engine.prototype.stop = function () {
|
||||
Zotero.debug("Stopping file syncing for " + this.library.name);
|
||||
Zotero.debug("Stopping file sync for " + this.library.name);
|
||||
for (let type in this.queues) {
|
||||
this.queues[type].stop();
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ Zotero.Sync.Data.Engine.prototype.start = Zotero.Promise.coroutine(function* ()
|
|||
* Stop the sync process
|
||||
*/
|
||||
Zotero.Sync.Data.Engine.prototype.stop = function () {
|
||||
Zotero.debug("Stopping sync for " + this.library.name);
|
||||
Zotero.debug("Stopping data sync for " + this.library.name);
|
||||
this._stopping = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,6 +79,8 @@ Zotero.Sync.Runner_Module = function (options = {}) {
|
|||
var _currentLastSyncLabel;
|
||||
var _errors = [];
|
||||
|
||||
Zotero.addShutdownListener(() => this.stop());
|
||||
|
||||
this.getAPIClient = function (options = {}) {
|
||||
return new Zotero.Sync.APIClient({
|
||||
baseURL: this.baseURL,
|
||||
|
|
Loading…
Add table
Reference in a new issue