Problem: XPUB keeps matched pipes between failed non-blocking sends

Solution: always unmatch all pipes before matching for an initial
message part.
This commit is contained in:
Tarmo Tänav 2020-07-29 16:32:34 +03:00
parent 75669de3c7
commit 27bf9bf7d0

View File

@ -298,6 +298,9 @@ int zmq::xpub_t::xsend (msg_t *msg_)
// For the first part of multi-part message, find the matching pipes.
if (!_more_send) {
// Ensure nothing from previous failed attempt to send is left matched
_dist.unmatch ();
if (unlikely (_manual && _last_pipe && _send_last_pipe)) {
_subscriptions.match (static_cast<unsigned char *> (msg_->data ()),
msg_->size (), mark_last_pipe_as_matching,