mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 08:34:00 +00:00
Problem: metadata is stored for PUB sockets and never processed
Solution: do not store user messages when the socket type is PUB, they will never be processed
This commit is contained in:
parent
821ab88f96
commit
cf9ccbbd37
@ -131,8 +131,10 @@ void zmq::xpub_t::xread_activated (pipe_t *pipe_)
|
|||||||
_process_subscribe =
|
_process_subscribe =
|
||||||
!_only_first_subscribe || is_subscribe_or_cancel;
|
!_only_first_subscribe || is_subscribe_or_cancel;
|
||||||
|
|
||||||
if (!is_subscribe_or_cancel) {
|
if (!is_subscribe_or_cancel && options.type != ZMQ_PUB) {
|
||||||
// Process user message coming upstream from xsub socket
|
// Process user message coming upstream from xsub socket,
|
||||||
|
// but not if the type is PUB, which never processes user
|
||||||
|
// messages
|
||||||
_pending_data.push_back (blob_t (msg_data, msg.size ()));
|
_pending_data.push_back (blob_t (msg_data, msg.size ()));
|
||||||
if (metadata)
|
if (metadata)
|
||||||
metadata->add_ref ();
|
metadata->add_ref ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user