Search code examples
websocketlong-pollingatmosphere

Multiple subscribe not working with enableProtocol:true


I am using atmosphere jersey with redis broadcaster. When I keep enableProtocol:true in javascript, the first subscribe request is successful. But when I send next subscribe request I get Continuation Frame warning. I tested on Google chrome. I have attached the snapshothere.

What could the issue be?

It works when I keep enableProtocol:false. But then onDisconnect is not called in long-polling.

After some observation I found that the X-Atmosphere-tracking-id=0 in first request and in subsequent requests I get it as the tracking id of previous request.

How do I avoid this?


Solution

  • You can try by manually setting the tracking-id to 0 before each subscribe.

    $.atmosphere.uuid = 0