mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-06 00:31:13 +01:00
Bug caused by interaction of REQ/REP routing and HWM fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
97add1ec2f
commit
184bdb8e2b
16
src/xrep.cpp
16
src/xrep.cpp
@ -177,8 +177,22 @@ int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_)
|
|||||||
blob_t identity ((unsigned char*) zmq_msg_data (msg_),
|
blob_t identity ((unsigned char*) zmq_msg_data (msg_),
|
||||||
zmq_msg_size (msg_));
|
zmq_msg_size (msg_));
|
||||||
outpipes_t::iterator it = outpipes.find (identity);
|
outpipes_t::iterator it = outpipes.find (identity);
|
||||||
if (it != outpipes.end ())
|
|
||||||
|
if (it != outpipes.end ()) {
|
||||||
current_out = it->second.writer;
|
current_out = it->second.writer;
|
||||||
|
zmq_msg_t empty;
|
||||||
|
int rc = zmq_msg_init (&empty);
|
||||||
|
zmq_assert (rc == 0);
|
||||||
|
if (!current_out->check_write (&empty)) {
|
||||||
|
rc = zmq_msg_close (&empty);
|
||||||
|
zmq_assert (rc == 0);
|
||||||
|
it->second.active = false;
|
||||||
|
errno = EAGAIN;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
rc = zmq_msg_close (&empty);
|
||||||
|
zmq_assert (rc == 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int rc = zmq_msg_close (msg_);
|
int rc = zmq_msg_close (msg_);
|
||||||
|
Loading…
Reference in New Issue
Block a user