Skip to content

Commit

Permalink
fix blocking_write
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Oct 30, 2023
1 parent 942dbfc commit 56e8f4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transaction/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,9 @@ impl<Cod: Codec, PdC: PdClient> Drop for Transaction<Cod, PdC> {
if std::thread::panicking() {
return;
}
let mut status = futures::executor::block_on(self.status.write());
// Don't use `futures::executor::block_on`.
// See https://github.com/tokio-rs/tokio/issues/2376.
let mut status = self.status.blocking_write();
if *status == TransactionStatus::Active {
match self.options.check_level {
CheckLevel::Panic => {
Expand Down

0 comments on commit 56e8f4d

Please sign in to comment.