Don't send lockReleased on Standalone restart

This prevents Zotero for Firefox from starting up and shutting down when
Standalone is just restarting.
This commit is contained in:
Dan Stillman 2016-11-12 22:03:06 -05:00
parent 79700969e1
commit cfc7f36829
2 changed files with 7 additions and 2 deletions

View file

@ -1179,6 +1179,9 @@ Zotero.Utilities.Internal = {
*/
quitZotero: function(restart=false) {
var startup = Services.startup;
if (restart) {
Zotero.restarting = true;
}
startup.quit(startup.eAttemptQuit | (restart ? startup.eRestart : 0) );
}
}

View file

@ -861,8 +861,10 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
// close DB
yield Zotero.DB.closeDatabase(true)
// broadcast that DB lock has been released
Zotero.IPC.broadcast("lockReleased");
if (!Zotero.restarting) {
// broadcast that DB lock has been released
Zotero.IPC.broadcast("lockReleased");
}
}
} catch(e) {
Zotero.logError(e);