-
|
in Lifecycle Reducers session are created when client connected, and session removed when client disconnected. also what the schema of linked to #3970 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe this depends on the order of the server shutdown, i.e. whether it is graceful or not. If the server crashes/force-stops, then the session entry will remain there. For such cases, you should probably have a unique index on the
This is left to your taste, as it depends on your own business logic requirements. An example is an example :) P.S. I'm no Clockwork Labs guy, just a heavy SpacetimeDB user. Treat my response with a grain of salt. |
Beta Was this translation helpful? Give feedback.
I believe this depends on the order of the server shutdown, i.e. whether it is graceful or not.
If the server crashes/force-stops, then the session entry will remain there. For such cases, you should probably have a unique index on the
identity, and remove any stale session for it before creating a new one in theclient_connectedreducer.This is left to your taste, as it depends on your own business logic requirements. An example is an example :)
P.S. I'm no Clockwork Labs guy, just a heavy SpacetimeDB user. Treat my response with a grain of salt.