[zeromq-dev] Is there a bug in mdbroker.c?

雷达 leida.njucs at gmail.com
Sat Sep 7 08:44:34 CEST 2013

Excuse me,I read the  book and have a question.I'm not sure if there
is a bug in  mdbroker.c?
In method s_broker_purge,it assumes that the worker in waiting list is
ordered by expiry.But when broker received hearbeat msg from worker,
it only updates worker's expiry. Maybe It breaks the order of waiting
For example,the broker receives reday msg from worker A and B,then it
appends A,B to wating list.After a while B breaks down, and A sends
heartbeat msg to broker. When broker receives A's heartbeat msg,it
updates A's expiry. Now A's expiry is more recently than B.
Is that a bug? Or I have made a mistake.  Thank you very much.
Department of Computer Science & Technology, Nanjing University
address:306, MengMinwei Building, Hankou Road  22, Nanjing University
Nanjing 210093, P.R.China

More information about the zeromq-dev mailing list