From f2eb97514a8d3576850a2c06c1f5e08d9d7239bc Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Thu, 12 Jun 2025 15:12:29 +0200 Subject: [PATCH] Fix missing await on self.close_pool_inner() --- sqlx-pool-guard/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sqlx-pool-guard/src/lib.rs b/sqlx-pool-guard/src/lib.rs index d9d89eaae7..96f28f2861 100644 --- a/sqlx-pool-guard/src/lib.rs +++ b/sqlx-pool-guard/src/lib.rs @@ -56,18 +56,16 @@ impl SqlitePoolGuard { // Avoid waiting for db files once the pool is marked closed to ensure that we don't wait on some other sqlite pool to close the database. if !self.connection_pool.is_closed() { tracing::info!("Closing sqlite pool: {}", self.database_path.display()); - _ = self.close_pool_inner(); + self.close_pool_inner().await.ok(); } } async fn close_pool_inner(&self) -> std::io::Result<()> { self.connection_pool.close().await; - if let Err(e) = self.wait_for_db_files_close().await { + self.wait_for_db_files_close().await.inspect_err(|e| { tracing::error!("Failed to wait for file to close: {e}"); - } - - Ok(()) + }) } /// Returns all database files, including shm and wal files.