Skip to content

Commit

Permalink
fix(projectconfig): set the min idle connections to max connections (#…
Browse files Browse the repository at this point in the history
…4300)

To restore the behaviour of r2d2 which set the `min_idle` to
`max_connections`, we have to do it by hand
  • Loading branch information
Litarnus authored Nov 27, 2024
1 parent 6046f47 commit 9b39f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion relay-redis/src/real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ impl AsyncRedisPool {
fn base_pool_builder<M: bb8::ManageConnection>(opts: &RedisConfigOptions) -> bb8::Builder<M> {
bb8::Pool::builder()
.max_size(opts.max_connections)
.min_idle(opts.min_idle)
.min_idle(opts.min_idle.unwrap_or(opts.max_connections))
.test_on_check_out(false)
.max_lifetime(Some(Duration::from_secs(opts.max_lifetime)))
.idle_timeout(Some(Duration::from_secs(opts.idle_timeout)))
Expand Down

0 comments on commit 9b39f40

Please sign in to comment.