Skip to content

Commit

Permalink
Uses an unwrapped transaction manager
Browse files Browse the repository at this point in the history
Use the regular transaction manager wrapped by the thread-transaction
manager so we can call unregisterSynch when close is called from
another thread, typically during database shutdown.
  • Loading branch information
jimfulton committed Oct 14, 2018
1 parent dc65b97 commit b6ac40f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ZODB/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,10 @@ def open(self, transaction_manager=None, delegate=True):
"""

if transaction_manager is None:
transaction_manager = transaction.manager
# The .manager bit below unwraps the threaded
# manager so we can call unregisterSynch in close
# when close is called from another thread.
transaction_manager = transaction.manager.manager

self.transaction_manager = transaction_manager

Expand Down

0 comments on commit b6ac40f

Please sign in to comment.