In developing a web application, I have integrated express and socket.io to enhance its functionality. One of the challenges I encountered is accessing the most updated version of express-session in socket.io without having to use
socket.request.session.reload(()=>{})
. Is there another method to achieve this seamlessly?
I attempted using Redisstore as a store for express session by implementing the code
store: new Redisstore({client: redisclient})
, but it did not yield the expected results. Could there be a different approach that I missed?
Furthermore, I am looking for suggestions on how to avoid race conditions when socket.io and express are simultaneously manipulating or utilizing data, leading to synchronization issues during reloads. Any insights on this matter would be greatly appreciated.