In release version of 4.2, we got a change in zmq::pipe_t::set_hwms, that 0 means infinite hwm.
void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_)
{
int in = inhwm_ + inhwmboost;
int out = outhwm_ + outhwmboost;
// if either send or recv side has hwm <= 0 it means infinite so we should set hwms infinite
if (inhwm_ <= 0 || inhwmboost <= 0)
in = 0;
if (outhwm_ <= 0 || outhwmboost <= 0)
out = 0;
lwm = compute_lwm(in);
hwm = out;
}
but in some case ,I use the dealer mode, and set sndhwm after connect, lead to the hwm and lwm eq 0. which is not my origin idea.
Then if one side (dealer mode)(side A) is infinite hwm, and another (router mode)(side B) set hwm to a limit number. Then A side will never send_activate_write to the peer, accoding to the follow code.
if (lwm > 0 && msgs_read % lwm == 0)
send_activate_write (peer, msgs_read);
Finally, we got a full hwm by check_hwm, and reset_pollin. Since then, no message can be caught.
In release version of 4.2, we got a change in
zmq::pipe_t::set_hwms, that 0 means infinite hwm.but in some case ,I use the dealer mode, and set sndhwm after connect, lead to the hwm and lwm eq 0. which is not my origin idea.
Then if one side (dealer mode)(side A) is infinite hwm, and another (router mode)(side B) set hwm to a limit number. Then A side will never send_activate_write to the peer, accoding to the follow code.
Finally, we got a full hwm by check_hwm, and reset_pollin. Since then, no message can be caught.