This commit is contained in:
Mostafa
2025-02-27 07:24:23 -06:00
parent 147eba52c0
commit 00ac44427f

View File

@@ -1111,23 +1111,20 @@ where
err err
); );
checkout_failure_count += 1; checkout_failure_count += 1;
match pool.settings.checkout_failure_limit { if let Some(limit) = pool.settings.checkout_failure_limit {
Some(limit) => { if checkout_failure_count >= limit {
if checkout_failure_count >= limit { error!("Checkout failure limit reached ({} / {}) - disconnecting client", checkout_failure_count, limit);
error!("Checkout failure limit reached ({} / {}) - disconnecting client", checkout_failure_count, limit); error_response_terminal(
error_response_terminal( &mut self.write,
&mut self.write, &format!(
&format!( "checkout failure limit reached ({} / {})",
"checkout failure limit reached ({} / {})", checkout_failure_count, limit
checkout_failure_count, limit ),
), )
) .await?;
.await?; self.stats.disconnect();
self.stats.disconnect(); return Ok(());
return Ok(());
}
} }
None => (),
} }
continue; continue;
} }