cozy / cozy-realtime-adapter

Utilities to manage realtime events in Cozy Applications
4 stars 2 forks source link

Fixed: prevent reconnection attempt if there was a connection error #4

Closed jsilvestre closed 9 years ago

jsilvestre commented 9 years ago

Following the issue we noticed when the connection is lost, socket.io becomes crazy and spams connection attempts.

I made a fix based on https://github.com/Automattic/socket.io-client/issues/737#issuecomment-61381603.

This PR is not built.

aenario commented 9 years ago

Why not just setting reconnection: false in the parameters of socket.io ? This also means that if the server/connection is down for a few seconds we lose the realtime.

jsilvestre commented 9 years ago

I don't know, probably because I copy/pasted the code from the issue, which seemed to be the okay solution for that matter. Do you want me to dig further?

aenario commented 9 years ago

Nope, nevermind, let's merge it and drop socket.io sometime in the future.

aenario commented 9 years ago

Could you build ?

jsilvestre commented 9 years ago

Sure, done!

aenario commented 9 years ago

Thanks ! I am not publishing because this is a client only change.