Skip to content

Cleaning up Room On Disconnect #2074

Closed Answered by miguelgrinberg
danbergelt asked this question in Q&A
Discussion options

You must be logged in to vote

Rooms are automatically garbage collected when they become empty. When a user disconnects they are removed from all the rooms they're in. Also nothing is stored on Redis, all storage is Python process memory. Redis is only used for sending notifications between processes.

The logic that removes a user from all the rooms is here if you want to review it.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by danbergelt
Comment options

You must be logged in to vote
1 reply
@miguelgrinberg
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants