Fix deadlock in DB.Close
This method was calling itself, instead of the underlying SQLite database's Close method.
This commit is contained in:
parent
51dc9f0bf9
commit
7ebe47ad4a
2
db.go
2
db.go
@ -127,7 +127,7 @@ func OpenSQLDB(driver, source string) (*DB, error) {
|
|||||||
func (db *DB) Close() error {
|
func (db *DB) Close() error {
|
||||||
db.lock.Lock()
|
db.lock.Lock()
|
||||||
defer db.lock.Unlock()
|
defer db.lock.Unlock()
|
||||||
return db.Close()
|
return db.db.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *DB) upgrade() error {
|
func (db *DB) upgrade() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user