From 75669de3c7843f5cf831821db82936aa902426f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarmo=20T=C3=A4nav?= Date: Wed, 29 Jul 2020 16:29:19 +0300 Subject: [PATCH 1/2] =?UTF-8?q?RELICENSE:=20Tarmo=20T=C3=A4nav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RELICENSE/tarmo.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 RELICENSE/tarmo.md diff --git a/RELICENSE/tarmo.md b/RELICENSE/tarmo.md new file mode 100644 index 00000000..67c6c7a0 --- /dev/null +++ b/RELICENSE/tarmo.md @@ -0,0 +1,15 @@ +# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL + +This is a statement by Tarmo Tänav that grants permission to +relicense its copyrights in the libzmq C++ library (ZeroMQ) under the +Mozilla Public License v2 (MPLv2) or any other Open Source Initiative +approved license chosen by the current ZeroMQ BDFL (Benevolent +Dictator for Life). + +A portion of the commits made by the Github handle "tarmo", with +commit author "Tarmo Tänav ", are copyright of Tarmo Tänav. +This document hereby grants the libzmq project team to relicense libzmq, +including all past, present and future contributions of the author listed above. + +Tarmo Tänav +2020/08/29 From 27bf9bf7d096a87eded4582aff6291f1323835db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarmo=20T=C3=A4nav?= Date: Wed, 29 Jul 2020 16:32:34 +0300 Subject: [PATCH 2/2] Problem: XPUB keeps matched pipes between failed non-blocking sends Solution: always unmatch all pipes before matching for an initial message part. --- src/xpub.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xpub.cpp b/src/xpub.cpp index 089a9c12..e996c55e 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -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 (msg_->data ()), msg_->size (), mark_last_pipe_as_matching,