Commit 6aa5c20b authored by Richard Newton's avatar Richard Newton

Merge pull request #1540 from djelenc/fix_failing_tests

Fixes failing tests regarding XPUB sockets.
parents 391bc12d 1240d7ac
......@@ -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 ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment