summaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-19 19:59:24 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-19 19:59:24 -0500
commita8b1e40a1e34178d9907b04f3a8e16a21b9eb42a (patch)
tree199ba6443e5589312d6ea5adce097a46ef3169b1 /ext/bg/js/database.js
parent7901a467217f311566e7a3bc83ceafa17909d511 (diff)
Close to prevent hangs
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js6
1 files changed, 6 insertions, 0 deletions
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();