diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-19 19:59:24 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-19 19:59:24 -0500 |
commit | a8b1e40a1e34178d9907b04f3a8e16a21b9eb42a (patch) | |
tree | 199ba6443e5589312d6ea5adce097a46ef3169b1 /ext/bg/js | |
parent | 7901a467217f311566e7a3bc83ceafa17909d511 (diff) |
Close to prevent hangs
Diffstat (limited to 'ext/bg/js')
-rw-r--r-- | ext/bg/js/database.js | 6 |
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(); |