I am developing a chat server through netty websocket. Our client side is mostly browser based. What's happening is, when I refresh the browser it closes the websocket connection and losses everything and creates a new socket when browser is loaded again. Is there any mechanism which shall reconnect with my previous websocket session at server side.
I am planning to cache all user session and if received any connection close event from client side then without deleting user session information waiting more 30-60s,in between if server receive new connection request from same client(detecting through cookies id) then replacing by new session information.
My problem is if I do not remove session when server receive connection close event , other read/write operation through this session's channel creating problem.