[zeromq-dev] 0MQ craching while polling in I/O thread
Martin Sustrik
sustrik at 250bpm.com
Mon Mar 29 15:18:39 CEST 2010
Dhammika,
> Think we're casting zmq::socket_t to zmq::socket_base_t in zmq_poll().
> Patch attached.
Yes. The point is that you should pass socket _handle_ to zmq_poll
rather than pointer to zmq_socket_t object. The handle can be retrieved
by casting zmq_socket_t to void*:
...
socket_t s (ctx, ZMQ_P2P);
pollitem_t item;
item.socket = s;
...
So it's user error. The documentation was modfied to make it clear.
Martin
More information about the zeromq-dev
mailing list