fix: off-by-one error reaching the min number of pooled connections (#1012)
This commit is contained in:
@@ -78,7 +78,7 @@ impl<E: Executor> Pool<E> {
|
||||
|
||||
#[cfg(feature = "tracing")]
|
||||
let mut created = 0;
|
||||
for _ in count..=(min_idle as usize) {
|
||||
for _ in count..(min_idle as usize) {
|
||||
let conn = match pool.client.connection().await {
|
||||
Ok(conn) => conn,
|
||||
Err(err) => {
|
||||
|
||||
@@ -72,7 +72,7 @@ impl Pool {
|
||||
|
||||
#[cfg(feature = "tracing")]
|
||||
let mut created = 0;
|
||||
for _ in count..=(min_idle as usize) {
|
||||
for _ in count..(min_idle as usize) {
|
||||
let conn = match pool.client.connection() {
|
||||
Ok(conn) => conn,
|
||||
Err(err) => {
|
||||
|
||||
Reference in New Issue
Block a user