limit 1 connection for sqlite

pull/208/head v0.80.61
hunterlong 2019-06-06 13:23:41 -07:00
parent 1efd3224ec
commit c2cf13172b
1 changed files with 3 additions and 0 deletions

View File

@ -214,6 +214,9 @@ func (db *DbConfig) Connect(retry bool, location string) error {
return err
}
}
if dbType == "sqlite3" {
dbSession.DB().SetMaxOpenConns(1)
}
err = dbSession.DB().Ping()
if err == nil {
DbSession = dbSession