atmosphere icon indicating copy to clipboard operation
atmosphere copied to clipboard

send max reconnect reached error code or event

Open hapali opened this issue 13 years ago • 3 comments

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)

hapali avatar Dec 14 '12 08:12 hapali

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

staabm avatar Dec 14 '12 08:12 staabm

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

jfarcand avatar Dec 14 '12 19:12 jfarcand

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

jfarcand avatar Jan 14 '13 22:01 jfarcand