speedtyper.dev
speedtyper.dev copied to clipboard
Store race id on socket instead of in session
Currently we store the current race id in the users session so we can reuse it between websocket events (and requests?)
The race id is not needed between different session (and is cleaned up when the socket disconnects), and should only live as long as the socket lives.
I would want to move this particular state from being stored in the users session, to storing it on the socket instance on the server.
This could also improve the user experience when having multiple tabs open (ie connecting with another socket does not block you from playing)