mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Gracefully handle situation when Redis Server is down
This commit is contained in:
14
options.go
14
options.go
@ -181,13 +181,13 @@ func ParseURL(redisURL string) (*Options, error) {
|
||||
}
|
||||
|
||||
func newConnPool(opt *Options) *pool.ConnPool {
|
||||
return pool.NewConnPool(
|
||||
opt.Dialer,
|
||||
opt.PoolSize,
|
||||
opt.PoolTimeout,
|
||||
opt.IdleTimeout,
|
||||
opt.IdleCheckFrequency,
|
||||
)
|
||||
return pool.NewConnPool(&pool.Options{
|
||||
Dialer: opt.Dialer,
|
||||
PoolSize: opt.PoolSize,
|
||||
PoolTimeout: opt.PoolTimeout,
|
||||
IdleTimeout: opt.IdleTimeout,
|
||||
IdleCheckFrequency: opt.IdleCheckFrequency,
|
||||
})
|
||||
}
|
||||
|
||||
// PoolStats contains pool state information and accumulated stats.
|
||||
|
Reference in New Issue
Block a user