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

[atmosphere.js] long-polling, two messages in one request, only last one does callback #568

Closed
nite23 opened this issue Aug 20, 2012 · 1 comment

Comments

@nite23
Copy link
Contributor

nite23 commented Aug 20, 2012

With long-polling transport, and MessageLengthInterceptor, whenever two messages arrive in a single request, they are split along the delimiter, but the onMessage callback is called only for the last one.

For example, raw message is a string '{"message1" : null}|{"message2" : null}|'
Only a single onMessage(respose) is called, with response.responseBody containing '{"message2" : null}';

@xenster86
Copy link

Same problem. This is more easily reproducible if HeaderBroadcasterCache is added.
_invokeCallback is executed with 're-opening' state before 'messageReceived' state. _response.responseBody will be overwritten by last splitted message during 're-opening' state

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