mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-25 18:06:29 +00:00
Less dirty servers & fix python
This commit is contained in:
@@ -50,6 +50,11 @@ impl ManageConnection for ServerPool {
|
||||
async fn is_valid(&self, conn: &mut PooledConnection<'_, Self>) -> Result<(), Self::Error> {
|
||||
let server = &mut *conn;
|
||||
|
||||
// Client disconnected before cleaning up
|
||||
if server.in_transaction() {
|
||||
return Err(Error::DirtyServer);
|
||||
}
|
||||
|
||||
// If this fails, the connection will be closed and another will be grabbed from the pool quietly :-).
|
||||
// Failover, step 1, complete.
|
||||
match tokio::time::timeout(
|
||||
|
||||
Reference in New Issue
Block a user