mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
config.Redis#NewClient(): work-around go-redis/redis#1737
... by re-trying once more often than there are connections in the pool.
This commit is contained in:
parent
45b626c914
commit
3e45567368
1 changed files with 4 additions and 0 deletions
|
|
@ -33,6 +33,10 @@ func (r *Redis) NewClient(logger *zap.SugaredLogger) (*icingaredis.Client, error
|
|||
ReadTimeout: r.Timeout,
|
||||
})
|
||||
|
||||
opts := c.Options()
|
||||
opts.MaxRetries = opts.PoolSize + 1 // https://github.com/go-redis/redis/issues/1737
|
||||
c = redis.NewClient(opts)
|
||||
|
||||
return icingaredis.NewClient(c, logger, &r.Options), nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue