express.io icon indicating copy to clipboard operation
express.io copied to clipboard

Can't make session reconnect work

Open wallynm opened this issue 12 years ago • 1 comments

Hello guys, I'm having serious problems with socket.io, when the users hit F5 and refresh the browser socket.io recreates a new socket and erase my session data...

I've tried not recreate it, setting some parameters at creator method as this example:

app = express().http().io('myurl', {PARAMETERS});

I don't remember right which PARAMETERS was setted after the url, but this still didn't worked... I've tried to configure the socket.io to accept reconnect but still don't know how to get it working, if someone knows how to configure express.io to run the 'reconnect' method it would be very helpfull.

wallynm avatar Oct 14 '13 21:10 wallynm

I've made some tests here, and i had discovered that the disconnect event works just for the backend, so, it's just called when the server is down, but i need a reconnect event to be trigered at the frontend and not create a new socket, and also don't lose it's session data.

wallynm avatar Oct 14 '13 21:10 wallynm