[zeromq-dev] Libev integration problem: Stop receiving ZMQ_EVENTS events
CheYi Lin
cheyi.lin at gmail.com
Mon Dec 10 08:36:41 CET 2012
Hi,
I'm doing some zmq ROUTER-to-ROUTER experiments in my distributed
system prototype.
(single threaded, libev event loop based application)
Below is my test steps:
1. ROUTER A and B start, set unique identity, bind the address.
(handshake)
2. A connect to B.
3. A send HELLO to B continuously.
4. B recv HELLO then send HELLO_ACK back to A.
5. A recv HELLO_ACK and stop sending HELLO, handshake finished.
(start communication)
6. A and B send HEARTBEAT to each other every 0.5 seconds.
7. When HEARTBEAT received, A and B print "recv HEARTBEAT".
After about 30 seconds, A stop printing "recv HEARTBEAT" but B
continue printing "recv HEARTBEAT".
And few seconds later I terminate B, suddenly A print lots of "recv HEARTBEAT".
I notice that A stop being signaled from the ZMQ_FD (in gdb), so all
HEARTBEAT from B was queued
after A stop printing "recv HEARTBEAT".
My zmq-event handler:
http://pastebin.com/6JiSh46N
Don't know why the handler stop receiving ZMQ_EVENTS events.
Could someone please review my code and give me some suggestions?
Sorry for my bad english.
Regards,
Cheyi
More information about the zeromq-dev
mailing list