--- a/server/session.py Wed Jun 26 14:35:55 2013 +0200
+++ b/server/session.py Wed Jun 26 14:26:06 2013 +0200
@@ -431,11 +431,16 @@
is_request = False
- def __init__(self, session, cnxid, session_handled=False):
+ def __init__(self, session, cnxid=None, session_handled=False):
# using super(Connection, self) confuse some test hack
RequestSessionBase.__init__(self, session.vreg)
+ # only the session provide explicite
+ if cnxid is not None:
+ assert session_handled # only session profive explicite cnxid
#: connection unique id
self._open = None
+ if cnxid is None:
+ cnxid = '%s-%s' % (session.id, uuid4().hex)
self.connectionid = cnxid
#: self._session_handled
#: are the life cycle of this Connection automatically controlled by the