Skip to content

Commit

Permalink
Merge pull request #106 from kylin2017/master
Browse files Browse the repository at this point in the history
MOD
  • Loading branch information
kylin2017 authored Sep 25, 2019
2 parents b4e6f8b + 7e943a7 commit 7e5d98e
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 7e5d98e

Please sign in to comment.