mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-24 07:21:32 +01:00
Fixes failing tests regarding XPUB sockets.
Fixes tests that were introduced in a previous pull request. See https://github.com/zeromq/libzmq/pull/1539#issuecomment-132968987
This commit is contained in:
parent
391bc12d17
commit
1240d7ac83
@ -244,7 +244,12 @@ int zmq::xpub_t::xrecv (msg_t *msg_)
|
||||
memcpy (msg_->data (),
|
||||
pending_data.front ().data (),
|
||||
pending_data.front ().size ());
|
||||
msg_->set_metadata (pending_metadata.front ());
|
||||
|
||||
// set metadata only if there is some
|
||||
if (metadata_t* metadata = pending_metadata.front ()) {
|
||||
msg_->set_metadata (metadata);
|
||||
}
|
||||
|
||||
msg_->set_flags (pending_flags.front ());
|
||||
pending_data.pop_front ();
|
||||
pending_metadata.pop_front ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user