Skip to content

Commit

Permalink
Merge pull request #242 from share/close-milestone-database
Browse files Browse the repository at this point in the history
Close milestone database when calling `Backend.close`
  • Loading branch information
ericyhwang authored Sep 5, 2018
2 parents 76dc6de + c1f58a5 commit fb906ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Backend.prototype._shimAfterSubmit = function() {
};

Backend.prototype.close = function(callback) {
var wait = 3;
var wait = 4;
var backend = this;
function finish(err) {
if (err) {
Expand All @@ -126,6 +126,7 @@ Backend.prototype.close = function(callback) {
}
this.pubsub.close(finish);
this.db.close(finish);
this.milestoneDb.close(finish);
for (var name in this.extraDbs) {
wait++;
this.extraDbs[name].close(finish);
Expand Down

0 comments on commit fb906ef

Please sign in to comment.