Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send max reconnect reached error code or event #774

Closed
hapali opened this issue Dec 14, 2012 · 3 comments
Closed

send max reconnect reached error code or event #774

hapali opened this issue Dec 14, 2012 · 3 comments

Comments

@hapali
Copy link

hapali commented Dec 14, 2012

Sometimes host application want to do something when atmosphere doesn't reconnect anymore. This can be solved by sending events:

$(document).trigger("atmosphere-reconnect-max-try-reached");
or
$(document).trigger("atmosphere-error", errorCode);

or send error code as argument of onError
function onError(errorCode)

@staabm
Copy link
Contributor

staabm commented Dec 14, 2012

In case you want to implement something like that, you may use event namespaces for it.
see http://api.jquery.com/event.namespace/

@jfarcand
Copy link
Member

@hapali @staabm Patch welcomed :-) Let's try to add it in 1.1.0.beta3. Thanks for the feedback!

@jfarcand
Copy link
Member

onError is now called in 1.0.6 and up. Closing as fixed, let me know if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants