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:
parent
79700969e1
commit
cfc7f36829
2 changed files with 7 additions and 2 deletions
|
@ -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) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue