Skip to content

Commit

Permalink
transaction check in with_sessions for server 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Mar 29, 2024
1 parent 7d1310d commit 5a91963
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mongoid/clients/sessions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def with_session(options = {})
else
raise ex
end
rescue *transactions_not_supported_exceptions
raise Mongoid::Errors::TransactionsNotSupported
ensure
Threaded.clear_session(client: persistence_context.client)
end
Expand Down

0 comments on commit 5a91963

Please sign in to comment.