You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in a publisher/subscriber schema some published messages may be lost with
curren implementation of cr_readln
I attach two test files, one is a publisher, and the oter is a subscriber. Just
compile and launch the subscriber before publisher.
*Some frames get lost because of line
rc = cr_receivedata(rhnd->fd, rhnd->timeout, buf->data + buf->len, avail);
When filling the buffer, it can be populated with more than a message. Only
first message gets parsed and other messages are lost.
If that line is modified to
rc = cr_receivedata(rhnd->fd, rhnd->timeout, buf->data + buf->len, 1);
Recompile and run the same test, shows no message lost.
Some speed will be lost with this patch (i haven't bencharmked this, and
probably won't do) but no message will be lost.
I think that is a trade off between speed and fiability.
Tests and patch are provided.
Any other implementation with no speed lost will be welcome.
Original issue reported on code.google.com by [email protected] on 24 Apr 2012 at 1:44
Original issue reported on code.google.com by
[email protected]
on 24 Apr 2012 at 1:44Attachments:
The text was updated successfully, but these errors were encountered: