mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-22 16:22:55 +00:00
fix(redis): set ConnMaxIdleTime, not ConnMaxLifetime
This commit is contained in:
@@ -39,7 +39,7 @@ func (r *Redis) Client() (*redis.Client, error) {
|
||||
}
|
||||
|
||||
if r.ConnectionIdleTimeout > 0 {
|
||||
opts.ConnMaxLifetime = time.Duration(r.ConnectionIdleTimeout) * time.Second
|
||||
opts.ConnMaxIdleTime = time.Duration(r.ConnectionIdleTimeout) * time.Second
|
||||
} else if r.ConnectionIdleTimeout == -1 {
|
||||
opts.ConnMaxIdleTime = -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user