diff --git a/lib/democracy.js b/lib/democracy.js index 397068c..ac3cd82 100644 --- a/lib/democracy.js +++ b/lib/democracy.js @@ -59,7 +59,7 @@ Democracy.prototype.init = function(options) { // Generate the details about this node to be sent between nodes. self._id = self.options.id; self._weight = self.options.weight; - self._state = 'follower'; + self._state = 'citizen'; // Setup the UDP socket to listen on. self.socket = dgram.createSocket({type: 'udp4', reuseAddr: true}); @@ -346,7 +346,7 @@ Democracy.prototype.resign = function(noElection) { var nodes = self.nodes(); if (self._state === 'leader') { - self._state = 'follower'; + self._state = 'citizen'; self.emit('resigned', nodes[self._id]); self.send('hello'); }