mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-01 14:55:59 +01:00
Merge pull request #1540 from djelenc/fix_failing_tests
Fixes failing tests regarding XPUB sockets.
This commit is contained in:
commit
6aa5c20b3d
@ -244,7 +244,12 @@ int zmq::xpub_t::xrecv (msg_t *msg_)
|
|||||||
memcpy (msg_->data (),
|
memcpy (msg_->data (),
|
||||||
pending_data.front ().data (),
|
pending_data.front ().data (),
|
||||||
pending_data.front ().size ());
|
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 ());
|
msg_->set_flags (pending_flags.front ());
|
||||||
pending_data.pop_front ();
|
pending_data.pop_front ();
|
||||||
pending_metadata.pop_front ();
|
pending_metadata.pop_front ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user