Skip to content

fix(kanban): close sqlite connection on init failure to prevent fd leak (#28301)#28404

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-de55f5dd
May 19, 2026
Merged

fix(kanban): close sqlite connection on init failure to prevent fd leak (#28301)#28404
teknium1 merged 1 commit into
mainfrom
hermes/hermes-de55f5dd

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvages #28301 by @Ade5954.

If apply_wal_with_fallback, PRAGMA application, or schema init raises after sqlite3.connect() succeeded, the new connection was leaking. Wraps the body in try/except: conn.close(); raise so the connection is freed before the exception propagates.

PR's branch was severely stale (missing the _INIT_LOCK refactor on main); applied the substantive try/except wrapping manually to current main's structure. Authorship preserved via rebase merge.

Salvages #28301 by @Ade5954. If WAL setup, PRAGMA application, or schema
init raises after sqlite3.connect() succeeds, the new connection was
leaking. Wrap the body in try/except so the connection is closed before
the exception propagates.
@teknium1 teknium1 merged commit 0392cf5 into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-de55f5dd branch May 19, 2026 03:30
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-de55f5dd vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8813 on HEAD, 8813 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4625 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants