Marc Sune 10694373e3 Fix ROUTER's xhas_out() in MANDATORY mode
Before this commit, xhas_out() was returning true regardless. This
was correct before the ZMQ_ROUTER_MANDATORY flag as introduced.
However, ZMQ_POLLOUT.

With this commit, _if_ ZMQ_ROUTER_MANDATORY is set, xhas_out() will
return false if ALL peer's outgoing pipes are full.

There is an outstanding high-level design question:

If ZMQ_ROUTER_MANDATORY is set, and zmq_poll() waits for ZMQ_POLLOUT
events, zmq_poll() will immediately wake up if only 1 pipe has
room to send, regardless of the peer, creating a busy loop of
zmq_poll() wake-up, zmq_send() (EAGAIN). There is no way for
the application to selectively wait for ZMQ_POLLOUT for specific
peer(s), which seems somehow necessary in ZMQ_ROUTER_MANDATORY.

This discussion will be addressed in a separate issue.

Signed-off-by: Marc Sune <marc@voltanet.io>
Signed-off-by: Fredi Raspall <fredi@voltanet.io>
2017-07-21 11:21:32 +02:00
..
2016-02-12 23:34:43 +11:00
2009-09-08 15:06:08 +02:00
2014-01-12 12:30:45 +01:00
2016-02-12 23:36:07 +11:00
2015-06-23 14:34:33 +03:00
2016-10-13 08:34:04 +00:00
2016-02-16 12:01:45 +01:00
2017-04-07 09:06:48 +08:00
2016-10-21 12:27:32 +02:00
2015-11-01 09:10:09 +01:00
2012-06-12 21:30:24 -04:00