mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 21:50:49 +01:00
recv fails after polling for IN on REQ socket
This commit is contained in:
13
src/req.cpp
13
src/req.cpp
@@ -191,16 +191,21 @@ int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_)
|
|||||||
|
|
||||||
waiting_for_reply = false;
|
waiting_for_reply = false;
|
||||||
reply_pipe = NULL;
|
reply_pipe = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool zmq::req_t::xhas_in ()
|
bool zmq::req_t::xhas_in ()
|
||||||
{
|
{
|
||||||
if (reply_pipe && reply_pipe->check_read ())
|
if (!waiting_for_reply || !reply_pipe_active)
|
||||||
return waiting_for_reply;
|
return false;
|
||||||
|
|
||||||
return false;
|
zmq_assert (reply_pipe);
|
||||||
|
if (!reply_pipe->check_read ()) {
|
||||||
|
reply_pipe_active = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool zmq::req_t::xhas_out ()
|
bool zmq::req_t::xhas_out ()
|
||||||
|
|||||||
Reference in New Issue
Block a user