From a8b1e40a1e34178d9907b04f3a8e16a21b9eb42a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 19 Feb 2020 19:59:24 -0500 Subject: Close to prevent hangs --- ext/bg/js/database.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/bg') diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index b54d832c..02d59c83 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -96,6 +96,12 @@ class Database { } } + async close() { + this.validate(); + this.db.close(); + this.db = null; + } + async purge() { this.validate(); -- cgit v1.2.3