You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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--------------->>>>>>>>>>");
});
The text was updated successfully, but these errors were encountered: