[zeromq-dev] Sender getting EAGAIN even though client is receiving message

Thomas Johnson thomas.j.johnson at gmail.com
Tue Dec 2 22:16:54 CET 2014


I have a PUSH/PULL socket set up where the pusher is a C++ application and
the puller is a Python application. Both are using ZMQ 4.0.4.

The C++ pusher sends with this code:


static int s_send (zmq::socket_t & socket, const std::string & string) {
  zmq::message_t message(string.size());
  memcpy (message.data(), string.data(), string.size());
  int rc = socket.send (message);
  return rc;
}
....
   int result = s_send(*_to_client_socket, message);
   while(result != 0 && zmq_errno() == EAGAIN) {
    LOG(WARNING) << "Re-sending message to client after getting EAGAIN: "
<< message;
    result = s_send(*_to_client_socket, message);
  }
...

The C++ sender is looping indefinitely in that re-sending block, but the
Python receiver is getting a constant stream of re-sent messages. Am I
doing error handling wrong somehow?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141202/79dd931e/attachment.htm>


More information about the zeromq-dev mailing list