server/session.py
changeset 9104 9dde49a393a4
parent 9103 b5c6d6aaa2bf
child 9105 55738c9dc26f
--- a/server/session.py	Wed Jun 26 11:39:41 2013 +0200
+++ b/server/session.py	Wed Jun 26 11:41:53 2013 +0200
@@ -1311,7 +1311,7 @@
         if cnx is not None:
             cnx.free_cnxset(ignoremode=True)
             self._clear_thread_storage(cnx)
-            self._clear_cnx_storage(cnx)
+            cnx.clear()
 
     def set_cnx(self, cnxid=None):
         """set the default connection of the current thread to <cnxid>
@@ -1513,9 +1513,9 @@
                 if cnx.ctx_count == 0:
                     self._clear_thread_storage(cnx)
                 else:
-                    self._clear_cnx_storage(cnx)
+                    cnx.clear()
             else:
-                self._clear_cnx_storage(cnx)
+                cnx.clear()
 
     def _clear_thread_storage(self, cnx):
         self._cnxs.pop(cnx.connectionid, None)
@@ -1525,8 +1525,6 @@
         except AttributeError:
             pass
 
-    def _clear_cnx_storage(self, cnx):
-        cnx.clear()
 
     def commit(self, free_cnxset=True, reset_pool=None):
         """commit the current session's transaction"""