Skip to content

fix(db): add try/finally to prevent connection leaks#23

Merged
cunoe merged 1 commit intomainfrom
fix/issue-10-db-connection-leak
Mar 31, 2026
Merged

fix(db): add try/finally to prevent connection leaks#23
cunoe merged 1 commit intomainfrom
fix/issue-10-db-connection-leak

Conversation

@cunoe
Copy link
Copy Markdown
Contributor

@cunoe cunoe commented Mar 31, 2026

Closes #10

Summary

  • Wrap database operations in try/finally blocks in com.ts and init.ts
  • Ensures dbManager.close() is always called even if an exception occurs

@cunoe cunoe merged commit b680967 into main Mar 31, 2026
1 of 2 checks passed
@cunoe cunoe deleted the fix/issue-10-db-connection-leak branch March 31, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

数据库连接泄露风险 — 缺少 try/finally

1 participant