0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-25 22:30:51 +08:00

Merge pull request #3996 from tarmo/xpub-unmatch

Problem: XPUB keeps matched pipes between failed non-blocking sends
This commit is contained in:
Luca Boccassi 2020-07-29 17:35:18 +01:00 committed by GitHub
commit 7deb8ded43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

15
RELICENSE/tarmo.md Normal file
View File

@ -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 <tarmo@itech.ee>", 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

View File

@ -299,6 +299,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,