Problem: ZMQ_CONFLATE on PUB sockets delivers to only one subscriber at most
Solution: Fix behavior of dbuffer on writes. Message passed in argument of dbuffer::write can be assigned directly to the back buffer without leaking, since the message has already the right reference count (see dist::distribute and msg_t::add_refs). Secondly, in order to prevent the message pending in the front buffer from leaking if it hasn't been closed yet (for example because the peer is not reachable anymore), move back buffer to front buffer using msg_t::move instead of swapping the buffers, thus allowing release of the message in the front buffer.
Showing
Please
register
or
sign in
to comment