Commit 21455397 authored by Martin Hurton's avatar Martin Hurton

Return -1 when failed to publish message

parent 228426ac
......@@ -131,8 +131,10 @@ int zmq::xpub_t::xsend (msg_t *msg_)
subscriptions.match ((unsigned char*) msg_->data (), msg_->size (),
mark_as_matching, this);
if (nodrop && !dist.check_hwm ())
return EAGAIN;
if (nodrop && !dist.check_hwm ()) {
errno = EAGAIN;
return -1;
}
// Send the message to all the pipes that were marked as matching
// in the previous step.
......
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