From 20a666bd922bb106fe6ff3d3089eff46b8a8fada Mon Sep 17 00:00:00 2001 From: skitty Date: Mon, 15 Jun 2026 00:43:45 +0900 Subject: [PATCH] fix(vocabbuilder): leaked db conn breaking sync (#15531) closes #14002 --- plugins/vocabbuilder.koplugin/db.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/vocabbuilder.koplugin/db.lua b/plugins/vocabbuilder.koplugin/db.lua index 7d92a4f1e..fe74f7579 100644 --- a/plugins/vocabbuilder.koplugin/db.lua +++ b/plugins/vocabbuilder.koplugin/db.lua @@ -309,6 +309,7 @@ function VocabularyBuilder:hasWord(word) stmt:bind(word) local result = stmt:step() stmt:close() + conn:close() if result then return { book_title = result[1], @@ -426,6 +427,7 @@ function VocabularyBuilder.onSync(local_path, cached_path, income_path) if not ok1 or tonumber(v1) == 0 then -- no income db or wrong db, first time sync logger.dbg("vocabbuilder open income DB failed", v1) + conn_income:close() return true end @@ -466,6 +468,7 @@ function VocabularyBuilder.onSync(local_path, cached_path, income_path) if not ok3 or tonumber(v3) == 0 then -- no local db, this is an error logger.err("vocabbuilder open local DB", v3) + conn:close() return false end