server/session.py
branchstable
changeset 2055 e4283fc56873
parent 2054 277e8d3b1154
child 2063 fe4278b50388
--- a/server/session.py	Fri Jun 05 16:35:44 2009 +0200
+++ b/server/session.py	Fri Jun 05 16:41:09 2009 +0200
@@ -174,11 +174,12 @@
         # or rollback
         if self.pool is not None and self.mode == 'read':
             # even in read mode, we must release the current transaction
+            pool = self.pool
             self._threads_in_transaction.remove(threading.currentThread())
-            self.pool.pool_reset(self)
+            pool.pool_reset(self)
             self._threaddata.pool = None
             # free pool once everything is done to avoid race-condition
-            self.repo._free_pool(self.pool)
+            self.repo._free_pool(pool)
 
     def system_sql(self, sql, args=None):
         """return a sql cursor on the system database"""