Skip to content

Commit

Permalink
Abort the transaction before closing the connection.
Browse files Browse the repository at this point in the history
Before the rework to use a context manager the transaction was aborted directly
on the transaction manager. We still need to do this as an Unauthorized would
not be raised but lead to a `Cannot close a connection joined to a
transaction`.
  • Loading branch information
sallner authored and hannosch committed Sep 13, 2017
1 parent a9ccb57 commit 8053d93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ZPublisher/WSGIPublisher.py
Expand Up @@ -222,6 +222,7 @@ def load_app(module_info):
try:
yield (app, realm, debug_mode)
finally:
transaction.abort()
app._p_jar.close()


Expand Down

0 comments on commit 8053d93

Please sign in to comment.