raft/states/state.py
async def on_message(self, message):
        """This method is called when a message is received,
        and calls one of the other corrosponding methods
        that this state reacts to.

        """
        _type = message.type

        if message.term > self._server._currentTerm:
            self._server._currentTerm = message.term
        # Is the messages.term < ours? If so we need to tell
        #   them this so they don't get left behind.
        elif message.term < self._server._currentTerm:
            if _type != BaseMessage.MessageType.Response:
                # Do not send a response to a response
                await self._send_response_message(message, yes=False)
            return self, None

        if _type == BaseMessage.MessageType.AppendEntries:
            return await self.on_append_entries(message)
        elif _type == BaseMessage.MessageType.RequestVote:
            return await self.on_vote_request(message)
        elif _type == BaseMessage.MessageType.RequestVoteResponse:
            return await self.on_vote_received(message)
        elif _type == BaseMessage.MessageType.Response:
            return await self.on_response_received(message)
        else:
            raise Exception(f"Unknown message type: {type(message)}")
This method is called when a message is received,
        and calls one of the other corrosponding methods
        that this state reacts to.

        
This method is called when a message is received,
and calls one of the other corrosponding methods
that this state reacts to.
This method is called when a message is received and calls one of the other corrosponding methods that this state reacts to .
async def on_message(self, message):
        _type = message.type
        if message.term > self._server._currentTerm:
            self._server._currentTerm = message.term
        elif message.term < self._server._currentTerm:
            if _type != BaseMessage.MessageType.Response:
                await self._send_response_message(message, yes=False)
            return self, None
        if _type == BaseMessage.MessageType.AppendEntries:
            return await self.on_append_entries(message)
        elif _type == BaseMessage.MessageType.RequestVote:
            return await self.on_vote_request(message)
        elif _type == BaseMessage.MessageType.RequestVoteResponse:
            return await self.on_vote_received(message)
        elif _type == BaseMessage.MessageType.Response:
            return await self.on_response_received(message)
        else:
            raise Exception(f"Unknown message type: {type(message)}")
async def on_message ( self , message ) : _type = message . type if message . term > self . _server . _currentTerm : self . _server . _currentTerm = message . term elif message . term < self . _server . _currentTerm : if _type != BaseMessage . MessageType . Response : await self . _send_response_message ( message , yes = False ) return self , None if _type == BaseMessage . MessageType . AppendEntries : return await self . on_append_entries ( message ) elif _type == BaseMessage . MessageType . RequestVote : return await self . on_vote_request ( message ) elif _type == BaseMessage . MessageType . RequestVoteResponse : return await self . on_vote_received ( message ) elif _type == BaseMessage . MessageType . Response : return await self . on_response_received ( message ) else : raise Exception ( f"Unknown message type: {type(message)}" )
This method is called when a message is received,
and calls one of the other corrosponding methods
that this state reacts to.
This method is called when a message is received and calls one of the other corrosponding methods that this state reacts to .
"""This method is called when a message is received,
        and calls one of the other corrosponding methods
        that this state reacts to.

        """ # Is the messages.term < ours? If so we need to tell #   them this so they don't get left behind. # Do not send a response to a response
self
message