Compare commits

..

No commits in common. "a0b20be22c9b22e57de82d09e0a301da7d340e9e" and "713e10d22341fa25a4e031d4aa04ca28b1af33ba" have entirely different histories.

1 changed files with 2 additions and 5 deletions

View File

@ -210,11 +210,8 @@ class TinyRaft extends EventEmitter
this.followers = this.votes[this.nodeId];
for (const follower of this.followers)
{
if (follower != this.nodeId)
{
// Send a heartbeat to confirm leadership
this.send(follower, { type: PING, term: this.term });
}
// Send a heartbeat to confirm leadership
this.send(follower, { type: PING, term: this.term });
}
this.emit('change', { state: this.state, term: this.term, leader: this.nodeId, followers: this.votes[this.nodeId] });
}