We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce9d800 commit c46c94bCopy full SHA for c46c94b
src/transaction_manager.rs
@@ -182,7 +182,11 @@ impl AnsiTransactionManager {
182
where
183
F: std::future::Future,
184
{
185
- is_broken.store(true, Ordering::Relaxed);
+ let was_broken = is_broken.swap(true, Ordering::Relaxed);
186
+ debug_assert!(
187
+ !was_broken,
188
+ "Tried to execute a transaction SQL on transaction manager that was previously cancled"
189
+ );
190
let res = f.await;
191
is_broken.store(false, Ordering::Relaxed);
192
res
0 commit comments