fix: off-by-one error reaching the min number of pooled connections (#1012)

This commit is contained in:
Paolo Barbolini
2024-12-05 19:19:54 +01:00
committed by GitHub
parent 83ce5872d7
commit 02dfc7dd4a
2 changed files with 2 additions and 2 deletions

View File

@@ -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) => {

View File

@@ -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) => {