Set in_progress to false AFTER executing the statement

This commit is contained in:
Jussi Saurio
2025-10-16 15:53:58 +03:00
parent d77dd8400d
commit 455f0fbc46

View File

@@ -126,8 +126,8 @@ impl Transaction<'_> {
#[inline]
async fn _commit(&mut self) -> Result<()> {
self.in_progress = false;
self.conn.execute("COMMIT", ()).await?;
self.in_progress = false;
Ok(())
}
@@ -139,8 +139,8 @@ impl Transaction<'_> {
#[inline]
async fn _rollback(&mut self) -> Result<()> {
self.in_progress = false;
self.conn.execute("ROLLBACK", ()).await?;
self.in_progress = false;
Ok(())
}