Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to catch onLeader and onnewLeader event #26

Open
sakhil opened this issue Nov 21, 2012 · 1 comment
Open

Not able to catch onLeader and onnewLeader event #26

sakhil opened this issue Nov 21, 2012 · 1 comment

Comments

@sakhil
Copy link

sakhil commented Nov 21, 2012

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--------------->>>>>>>>>>");
});

@karanjassar
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants