mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-31 13:54:27 +01:00
Set in_progress to false AFTER executing the statement
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user