mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-03 12:58:05 +01:00
Merge pull request #2622 from msune/master
Fix ROUTER's xhas_out() in MANDATORY mode
This commit is contained in:
commit
bba4a93727
@ -423,10 +423,19 @@ bool zmq::router_t::xhas_in ()
|
|||||||
|
|
||||||
bool zmq::router_t::xhas_out ()
|
bool zmq::router_t::xhas_out ()
|
||||||
{
|
{
|
||||||
// In theory, ROUTER socket is always ready for writing. Whether actual
|
// In theory, ROUTER socket is always ready for writing (except when
|
||||||
// attempt to write succeeds depends on which pipe the message is going
|
// MANDATORY is set). Whether actual attempt to write succeeds depends
|
||||||
// to be routed to.
|
// on whitch pipe the message is going to be routed to.
|
||||||
return true;
|
|
||||||
|
if(!mandatory)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
bool has_out = false;
|
||||||
|
outpipes_t::iterator it;
|
||||||
|
for (it = outpipes.begin (); it != outpipes.end (); ++it)
|
||||||
|
has_out |= it->second.pipe->check_hwm();
|
||||||
|
|
||||||
|
return has_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
zmq::blob_t zmq::router_t::get_credential () const
|
zmq::blob_t zmq::router_t::get_credential () const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user