I got a C-ZMQ client that receiving two random ports (from pyzmq
server) and then connecting to them.
Usually, everything is working, but sometimes the 2nd connect fail with errno set to EINVAL
. (Even when I switched between the connect calls the 2nd still failed).
The port number is fine and it looks like some kind of race condition in ZeroMQ.
Anyone know how can I solve this problem?
[EDIT]:
The server sends the ports in this structure "port1:port2
" for example "1234:1235
"
the hexdump of the packet on the server is 31 32 33 34 3a 31 32 33 35
and on the client is 31 32 33 34 3a 31 32 33 35 01
and because the extra byte the 2nd connect fails...
Maybe this is some kind of compatibility bug between pyzmq
and zmq
I'm using zmq ver 2.2.0