From 7ebe47ad4a3cfc4d3aee7e017e163009892ecdae Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 9 Jul 2020 11:23:51 +0200 Subject: [PATCH] Fix deadlock in DB.Close This method was calling itself, instead of the underlying SQLite database's Close method. --- db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.go b/db.go index 3a20e49..5c54fbc 100644 --- a/db.go +++ b/db.go @@ -127,7 +127,7 @@ func OpenSQLDB(driver, source string) (*DB, error) { func (db *DB) Close() error { db.lock.Lock() defer db.lock.Unlock() - return db.Close() + return db.db.Close() } func (db *DB) upgrade() error {