Closed otbzi closed 10 years ago
@mrniko thank you
@otbzi i'll check onDisconnect invocation during netty-socketio shutdown
what about the server crashed??
And normally, how do i manage the manually shutdown?? use the signal??
Do you use redis store via client store (Redisson) or wrote your own?
in my application,i used another redis client.
what i am trying to illustrate is that, is there a suggested way to deal with the the server restart?
if i did not invoke the stop/shutdown manually (for example, catch the signal then invoke stop()), there may be some old session remain in the redis, and will never be deleted....
it is the same when the server crashed.
Am I right about these above understanding??
in case of server crashed library can't send any event at all, so you should care about redis state by yourself
Hi,
recently, I implemented user session management with redis, maintained a uid->session_ids map upon application level. when a client is disconnected, delete a session from this map.
but,when server restarted, there is no on-disconnect any more. So the uid->session_ids map keeps growing.
I have digged the original netty-socketio code, I guess this problem may also exist when the netty-socketio manage all sessions, I thought there may be some ZADD or ZRANGEBYSCORE etc to deal with this situation. But I haven't found any.
Sorry, I can't figure out all code clearly.
So, I want to ask , how do u deal with situation?? or could u give me some hint , how the netty-socketio code manage this situation??
Thank you very much!!!!!