speedtyper.dev icon indicating copy to clipboard operation
speedtyper.dev copied to clipboard

Store race id on socket instead of in session

Open codicocodes opened this issue 2 years ago • 0 comments

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)

codicocodes avatar Feb 25 '23 11:02 codicocodes