Fix orm.SetMaxOpenConns

It should call `SetMaxOpenConns` instead of `SetMaxIdleConns`.
This commit is contained in:
zav8 2021-06-29 11:03:34 +08:00 committed by GitHub
parent 61f5ce8c6c
commit aff59f65fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,7 +427,7 @@ func SetMaxIdleConns(aliasName string, maxIdleConns int) {
// Deprecated you should not use this, we will remove it in the future
func SetMaxOpenConns(aliasName string, maxOpenConns int) {
al := getDbAlias(aliasName)
al.SetMaxIdleConns(maxOpenConns)
al.SetMaxOpenConns(maxOpenConns)
}
// SetMaxIdleConns Change the max idle conns for *sql.DB, use specify database alias name