orm add missed SetMaxIdleConns

This commit is contained in:
slene 2013-08-12 13:24:45 +08:00
parent eb06435f23
commit deb00809a5
1 changed files with 2 additions and 0 deletions

View File

@ -118,6 +118,8 @@ func RegisterDataBase(name, driverName, dataSource string, maxIdle int) {
goto end
}
al.DB.SetMaxIdleConns(al.MaxIdle)
err = al.DB.Ping()
if err != nil {
err = fmt.Errorf("register db `%s`, %s", name, err.Error())