Yes, the pipe cannot receive message any more after terminated. The code as
below:
in pipe.cpp:
bool zmq::pipe_t::read (msg_t *msg_)
{
if (unlikely (!in_active))
return false;
if (unlikely (state != active && state != waiting_for_delimiter)) // the
state is term_req_sent1 when receiving the second frame message while it is
active when receiving the first frame message
return false;
read_message:
if (!inpipe->read (msg_)) {
in_active = false;
return false;
}
On 10/7/2016 16:28, zmqdev<[email protected]>wrote:
On 07.10.2016 10:14, Laughing wrote:
> *>>>* Is that mean that socket.disconnect does not disconnect from
> all endpoint connected before?
see http://api.zeromq.org/4-1:zmq-disconnect
int zmq_disconnect (void *socket, const char *endpoint);
zmq_disconnect disconnects the socket from the given endpoint *only*.
> *>>> *It is a so bad news. I would like to use the disconnect
> routine to discard messages in 'REQ/REP' and 'PUSH/PULL' mode.
A ZeroMQ socket holds received messages in a queue.
To empty the queue, you can
a. receive and discard the messages until zmq_poll tells
you there is no data
b. destroy, then recreate & reconnect the socket
I do not know the internal details, for example whether a socket has a
queue per connection.
The bug seems to point towards some data management problem between
queues in the socket.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev