Make sure we broadcast lockReleased on shutdown
Previously a startup error could result in the database being opened and closed with no lockReleased message
This commit is contained in:
parent
d0e4151e8e
commit
dd8c0ecf37
4 changed files with 4 additions and 3 deletions
|
@ -796,6 +796,7 @@ Zotero.DBConnection.prototype.closeDatabase = function () {
|
|||
this.stopDummyStatement();
|
||||
var deferred = Q.defer();
|
||||
this._connection.asyncClose(deferred.resolve);
|
||||
this._connection = undefined;
|
||||
return deferred.promise;
|
||||
} else {
|
||||
return Q();
|
||||
|
|
|
@ -808,7 +808,7 @@ Components.utils.import("resource://gre/modules/Services.jsm");
|
|||
// remove temp directory
|
||||
Zotero.removeTempDirectory();
|
||||
|
||||
if(Zotero.initialized && Zotero.DB) {
|
||||
if(Zotero.DB && Zotero.DB._connection) {
|
||||
Zotero.debug("Closing database");
|
||||
|
||||
// run GC to finalize open statements
|
||||
|
|
2
styles
2
styles
|
@ -1 +1 @@
|
|||
Subproject commit 01e0f42aee7595b7cccafe731de57f277c2b76df
|
||||
Subproject commit c536a2c5c28ca465b511733a849ae452822fd363
|
|
@ -1 +1 @@
|
|||
Subproject commit 330bcfa0ab1c501b71d82d56b1cad88523cea722
|
||||
Subproject commit 6fcf964bf91100f087d84f714c65f89b1f50397c
|
Loading…
Reference in a new issue