Skip to content

Commit 2aa8636

Browse files
documentation on user session behavior on disconnections (Fixes #308)
1 parent 3062d3f commit 2aa8636

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/server.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ retrieve information in the user session::
396396

397397
For the ``asyncio`` server, these methods are coroutines::
398398

399-
400399
@sio.event
401400
async def connect(sid, environ):
402401
username = authenticate_user(environ)
@@ -437,6 +436,10 @@ The ``get_session()``, ``save_session()`` and ``session()`` methods take an
437436
optional ``namespace`` argument. If this argument isn't provided, the session
438437
is attached to the default namespace.
439438

439+
Note: the contents of the user session are destroyed when the client
440+
disconnects. In particular, user session contents are not preserved when a
441+
client reconnects after an unexpected disconnection from the server.
442+
440443
Using a Message Queue
441444
---------------------
442445

0 commit comments

Comments
 (0)