On occasion, hasMoreMessageParts would return true when the message did not, in fact, have any more parts. The result would be a thrown exception, as recv() was called on a REQ socket that had no waiting messages. The problem seemed to be caused by passing a quint64 to the zmq_getsockopt function. Since the man page for zmq_getsockopt said the value type for ZMQ_RCVMORE was int, I changed the quint64 to int and that seemed to solve the problem.
I've tested on 2 systems with the same code and neither have exhibited the problem since the change.
On occasion, hasMoreMessageParts would return true when the message did not, in fact, have any more parts. The result would be a thrown exception, as
recv()
was called on a REQ socket that had no waiting messages. The problem seemed to be caused by passing aquint64
to thezmq_getsockopt
function. Since the man page forzmq_getsockopt
said the value type forZMQ_RCVMORE
wasint
, I changed the quint64 toint
and that seemed to solve the problem.I've tested on 2 systems with the same code and neither have exhibited the problem since the change.