Dear ZeroMQ community, I am wondering if this behaviour is normal: zmq_send() is blocking on ZMQ_STREAM when client has disconnected.
I have a simple server using a ZMQ_STREAM socket to serve plain TCP clients. When a client disconnects, ZeroMQ effectively delivers a disconnection indication in the form of 2 frames : [ peer-identity, empty ]. Then, if I attempt to send some frames using this peer-identity, the call blocks (unless ZMQ_DONTWAIT is given). Shouldn’t it return EHOSTUNREACH instead, since the client has gone ? If I send to a non-existing peer-identity (for example, by altering a byte), the call returns immediately with EHOSTUNREACH. But why does it block on a previously used identity, since the client connection doesn’t exist anymore ? Doing “lsof” on the process effectively shows that the socket is gone. Since the ZeroMQ socket is the receiver of the connection and not the initiator, I don’t understand why this call should block. Thank you for your help ! Cheers, /phil.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
