[server/session] do not clear session.cnx if unrelated to cnx actually cleared
The cnx parameter may be different from the one actually loaded for the current
thread. This will be possible in future commit when you close a client connection
for example.
--- a/server/session.py Mon Jun 24 14:55:26 2013 +0200
+++ b/server/session.py Fri Jun 21 16:07:45 2013 +0200
@@ -1225,7 +1225,8 @@
def _clear_thread_storage(self, cnx):
self._cnxs.pop(cnx.connectionid, None)
try:
- del self.__threaddata.cnx
+ if self.__threaddata.cnx is cnx:
+ del self.__threaddata.cnx
except AttributeError:
pass