node-zkplus icon indicating copy to clipboard operation
node-zkplus copied to clipboard

Not able to catch onLeader and onnewLeader event

Open sakhil opened this issue 12 years ago • 1 comments

Hi,

I really like the zkplus . Thanks for such a nice abstraction . I am currently struck at a point. I am able to catch the close event but not able to catch the leader and newLeader event. Below is my code. Please help

election.vote(function (err, isLeader) { if(err) console.log(err); console.log(isLeader); // => 'true' || 'false' });

election.on('leader' , function(){ console.log("new leader--------------->>>>>>>>>>"); });

election.on('newLeader' , function(leader){ console.log("new leader" , leader); });

election.on('close', function () { console.log("new leader stopped--------------->>>>>>>>>>"); });

sakhil avatar Nov 21 '12 09:11 sakhil

Folks any update on this. I'm also facing this issue.

karanjassar avatar Feb 26 '13 12:02 karanjassar