socket.io-client icon indicating copy to clipboard operation
socket.io-client copied to clipboard

socket.io polling helpless for redirects

Open zevero opened this issue 11 years ago • 2 comments

Because of stupid company policy, I am behind some https secure login thing, which does not allow me to upgrade to websockets, leaving me with polling. When I type in username and email I get a session for one or two hours and everything is alright. But when the session is over socket.io turns wild. socket Green is normal polling. The blue dots are 25000 requests. Socket.io is trying really hard, but is helpless when beeing redirected by a 302 receiving the login form, which is cached 304.

Is there a way to detect this?

zevero avatar Jun 21 '15 14:06 zevero

socket.io will emit a 'reconnecting' event when it attempts reconnection so you can create an event handler that keeps track of the pace of reconnects. You can also prevent this I believe by setting reconnectionDelay to some large value: I suspect you might have set it thinking that it counts in seconds but it counts in milliseconds so if it's doing 25000 requests perhaps you put in 1 instead of 1000 for 1 second delays.

tecnogram888 avatar Jul 01 '15 17:07 tecnogram888

Closed due to inactivity, please reopen if needed.

darrachequesne avatar Jun 03 '17 12:06 darrachequesne