Commits

Mike Bayer  committed abed266

force_close...

  • Participants
  • Parent commits fe8eeed

Comments (0)

Files changed (1)

File lib/sqlalchemy/engine/threadlocal.py

         self.__tcount += 1
     def reset(self):
         try:
-            self.__transaction.close()
+            self.__transaction._force_close()
             del self.__transaction
             del self.__trans
         except AttributeError:
         if self.__opencount == 1:
             base.Connection.close(self)
         self.__opencount -= 1
-        
+    def _force_close(self):
+        self.__opencount = 0
+        base.Connection.close(self)
+            
 class TLTransaction(base.Transaction):
     def _commit_impl(self):
         base.Transaction.commit(self)