[zeromq-dev] FW: ZeroMQ Error when client starts first, server second. SOLVED.

Riskybiz riskybizLive at live.com
Sun Jul 28 14:14:56 CEST 2013


>"No. Your code thinks it's in the last iteration and sends without SNDMORE
- but then the vector grows and it tries to add another frame afterwards and
fails."

 

Christian, absolutely brilliant how you zeroed in on the problem.  Thanks,
your comments made me think a little differently.  The vector is growing as
the server is composing messages.

 

I fixed the error by breaking the 'for' loop which composes the multipart
message whenever the 'end' iterator is detected and the final part is sent;
so preventing any extra message frame with the incorrect ZMQ_SNDMORE flag.
Your suggestion of only reading the end() iterator once for each message
composition loop would also give a very tidy result I think.

 

Thanks again,

 

Riskybiz.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130728/95be7ca8/attachment.htm>


More information about the zeromq-dev mailing list