server/session.py
changeset 9105 55738c9dc26f
parent 9104 9dde49a393a4
child 9106 c14e8a2b4655
--- a/server/session.py	Wed Jun 26 11:41:53 2013 +0200
+++ b/server/session.py	Wed Jun 26 14:01:07 2013 +0200
@@ -1305,13 +1305,11 @@
                 self._cnxs[cnxid] = cnx
         return cnx
 
-    def close_cnx(self, cnxid):
+    def close_cnx(self, cnx):
         """Close a Connection related to a session"""
-        cnx = self._cnxs.get(cnxid, None)
-        if cnx is not None:
-            cnx.free_cnxset(ignoremode=True)
-            self._clear_thread_storage(cnx)
-            cnx.clear()
+        cnx.free_cnxset(ignoremode=True)
+        self._clear_thread_storage(cnx)
+        cnx.clear()
 
     def set_cnx(self, cnxid=None):
         """set the default connection of the current thread to <cnxid>