server/querier.py
changeset 4532 85116e75f561
parent 4252 6c4f109c2b03
child 4533 05eadf88b797
--- a/server/querier.py	Wed Feb 10 08:06:02 2010 +0100
+++ b/server/querier.py	Wed Feb 10 08:07:53 2010 +0100
@@ -666,7 +666,14 @@
             # the session). Even though, this is done here for a better
             # consistency: getting an Unauthorized exception means the
             # transaction has been rollbacked
-            session.rollback()
+            #
+            # notes:
+            # * we should not reset the pool here, since we don't want the
+            #   session to loose its pool during processing
+            # * don't rollback if we're in the commit process, will be handled
+            #   by the session
+            if session.commit_state is None:
+                session.rollback(reset_pool=False)
             raise
         # build a description for the results if necessary
         descr = ()