-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
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--------------->>>>>>>>>>");
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels