Reputation: 432
I am currently facing an issue using the Atmosphere Framework grails plugin, which is basically the Java and Javascript implementation of Atmosphere, but my question is specifically dealing with the JS (https://github.com/Atmosphere/atmosphere-javascript)
I am hitting a roadblock currently when a disconnect happens, and while it is more of a problem on mobile browsers, desktop browsers have issues sometimes as well. We get a "broken frame" error, which states:
WebSocket connection to '{URL}' failed: Received a broken close frame containing a reserved status code.
This occurs whenever internet is interrupted for any reason on any device. Wifi, 3g/4g, whatever. The only browser that seems to somewhat handle this is Firefox, and even that is touch and go. We currently have a hackjob in to try to reconnect clients to the socket, and it works fairly decently on desktops, but not very well on mobile. The library states this functionality should be built in, but it doesn't seem to be functional and I cannot find much online that talks about reconnecting to a socket that was closed due to a connection interuption.
So, finally my question. I want to know how others that use this framework handle internet interruptions on browsers, specifically Chrome, Safari, and IE. Any help would be appreciated.
Upvotes: 1
Views: 1927
Reputation: 685
I've added my comments to the answer, but you should check this thread. It seems related to your problem.
I suggest asking your question at the Atmosphere Group since it's probably related to the framework and not the plugin. I'm a hobby developer, and I haven't done much mobile testing. Could it be a problem with the underlying HttpSession? Does the phone keep the same JSESSIONID across the network changes? You mentioned that you’ve had to work around several problems. I’m looking for ways to improve the plugin, so please create an issue with your suggestions.
You can also create one or more wiki pages with your lessons learned. I’ll add links to the README the next time I update the plugin.
Upvotes: 1