You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Per-connection, we're keeping a large object in memory, which we would prefer to use across connections that are recovered through connection-state-recovery. Connection state recovery solves one problem for us, in that we can reconnect a client to its object, but this makes it harder to know when to delete the object.
Describe the solution you'd like
When a connection exceeds the connection state recovery maxDisconnectionDuration, I'd like an event trigger with the SocketID as an argument.
Describe alternatives you've considered
We've considered setting an additional timeout, but this won't ever be as accurate - we'd have to make this timeout longer than maxDisconnectionDuration, and deal with our large staying around longer than needed.
The text was updated successfully, but these errors were encountered:
I think implementing this for the in-memory adapter would be quite straightforward.
For the adapter based on Redis streams, we would need to listen to the "expired" events (ref), though it would not be reliable if the Redis client disconnects.
Not sure how we could implement it for the adapter based on MongoDB though...
Regarding the API, would something like this suit your needs?
Regarding the API, I must confess I'm quite new to JS, but it looks good to me. We'd use that handler to destroy the corresponding large object paired to sid.
One question - with the in-memory adapter, without connection-state-recovery, would this event still be received?
Is your feature request related to a problem? Please describe.
Per-connection, we're keeping a large object in memory, which we would prefer to use across connections that are recovered through connection-state-recovery. Connection state recovery solves one problem for us, in that we can reconnect a client to its object, but this makes it harder to know when to delete the object.
Describe the solution you'd like
When a connection exceeds the connection state recovery maxDisconnectionDuration, I'd like an event trigger with the SocketID as an argument.
Describe alternatives you've considered
We've considered setting an additional timeout, but this won't ever be as accurate - we'd have to make this timeout longer than maxDisconnectionDuration, and deal with our large staying around longer than needed.
The text was updated successfully, but these errors were encountered: