From aff59f65fb2eccf057e558274038a9720c048bef Mon Sep 17 00:00:00 2001 From: zav8 Date: Tue, 29 Jun 2021 11:03:34 +0800 Subject: [PATCH] Fix orm.SetMaxOpenConns It should call `SetMaxOpenConns` instead of `SetMaxIdleConns`. --- client/orm/db_alias.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/orm/db_alias.go b/client/orm/db_alias.go index c3b867c3..28c8ab8e 100644 --- a/client/orm/db_alias.go +++ b/client/orm/db_alias.go @@ -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