diff options
| author | Pjotr Prins | 2025-12-19 11:36:15 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2025-12-19 11:36:15 +0100 |
| commit | 84d911233db8a159cd0620aa71feb39a71486648 (patch) | |
| tree | 36b43ea37221d6dfdfb2632b860964a2fc4f4f10 | |
| parent | 0b66da373e049c3fcd4d6756a8aa2d3894f273ef (diff) | |
| download | gn-guile-84d911233db8a159cd0620aa71feb39a71486648.tar.gz | |
Make sure to close DB
| -rw-r--r-- | gn/db/mysql.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gn/db/mysql.scm b/gn/db/mysql.scm index 223b5fd..623a726 100644 --- a/gn/db/mysql.scm +++ b/gn/db/mysql.scm @@ -37,7 +37,9 @@ ))) (define (call-with-db thunk) - (thunk (db-open))) + (let [(db (db-open))] + (thunk db) + (dbi-close db))) (define (ensure db msg1) "Use DBI-style handle to report an error. On error the program will stop." |
