close unused DB connection

This commit is contained in:
osmarks 2021-01-28 19:41:54 +00:00
parent 532302ae8e
commit a0eabc3990

View File

@ -18,6 +18,7 @@ macro includeFile(x: string): string = newStrLitNode(readFile(x.strVal))
const css = includeFile("./src/style.css") const css = includeFile("./src/style.css")
let database = openDatabase("./monitoring.sqlite3") let database = openDatabase("./monitoring.sqlite3")
migrate(database) migrate(database)
close(database)
var threadDB {.threadvar.}: Option[DbConn] var threadDB {.threadvar.}: Option[DbConn]
proc getDB(): DbConn = proc getDB(): DbConn =