diff options
-rw-r--r-- | delicious_search.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/delicious_search.js b/delicious_search.js index b474c38..4f6e74c 100644 --- a/delicious_search.js +++ b/delicious_search.js @@ -250,8 +250,13 @@ let self = { context.generate = function() bookmarkSearch([], context.filter); }, close: function(){ - dbc.close(); - } + for each(let st in statements){ + if (st.state > 0) + statements[key].finalize(); + } + if (dbc.connectionReady) + dbc.close(); + }, }; self.init(); liberator.registerObserver("shutdown", self.close); |