mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix: gredis maxActive config and duplicate connection bug (#2479)
This commit is contained in:
@ -47,6 +47,7 @@ func New(config *gredis.Config) *Redis {
|
||||
Password: config.Pass,
|
||||
DB: config.Db,
|
||||
MaxRetries: defaultMaxRetries,
|
||||
PoolSize: config.MaxActive,
|
||||
MinIdleConns: config.MinIdle,
|
||||
MaxConnAge: config.MaxConnLifetime,
|
||||
IdleTimeout: config.IdleTimeout,
|
||||
|
||||
@ -58,7 +58,7 @@ func New(config ...*Config) (*Redis, error) {
|
||||
}
|
||||
redis := &Redis{
|
||||
config: config[0],
|
||||
localAdapter: defaultAdapterFunc(config[0]),
|
||||
localAdapter: usedAdapter,
|
||||
}
|
||||
return redis.initGroup(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user