mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-15 04:56:48 +00:00
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:
parent
75669de3c7
commit
27bf9bf7d0
@ -298,6 +298,9 @@ int zmq::xpub_t::xsend (msg_t *msg_)
|
|||||||
|
|
||||||
// For the first part of multi-part message, find the matching pipes.
|
// For the first part of multi-part message, find the matching pipes.
|
||||||
if (!_more_send) {
|
if (!_more_send) {
|
||||||
|
// Ensure nothing from previous failed attempt to send is left matched
|
||||||
|
_dist.unmatch ();
|
||||||
|
|
||||||
if (unlikely (_manual && _last_pipe && _send_last_pipe)) {
|
if (unlikely (_manual && _last_pipe && _send_last_pipe)) {
|
||||||
_subscriptions.match (static_cast<unsigned char *> (msg_->data ()),
|
_subscriptions.match (static_cast<unsigned char *> (msg_->data ()),
|
||||||
msg_->size (), mark_last_pipe_as_matching,
|
msg_->size (), mark_last_pipe_as_matching,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user