Skip to content

Commit

Permalink
MOD
Browse files Browse the repository at this point in the history
  • Loading branch information
kylin2017 committed Sep 25, 2019
1 parent bb814ca commit 7e943a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbrouter/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func dialByGorm(info *Sql) (db *gorm.DB, err error) {

slog.Infof(context.TODO(), "%s dbtype:%s datasourcename:%s", fun, info.dbType, dataSourceName)
gormdb, err := gorm.Open(info.dbType, dataSourceName)
if err != nil {
if err == nil {
gormdb.DB().SetMaxIdleConns(8)
gormdb.DB().SetMaxOpenConns(128)
}
Expand Down

0 comments on commit 7e943a7

Please sign in to comment.