Raft - ignoring Allocation activity if it is a response

This commit is contained in:
Pavel Kirienko
2015-05-24 20:12:33 +03:00
parent 59dd6d0905
commit c323d8e724
2 changed files with 6 additions and 3 deletions
@@ -61,7 +61,7 @@ public:
* Active state switch logic:
* Activation (this is default state):
* - vote request
* - allocation activity detected
* - allocation request at any stage
* - only if leader:
* - discovery activity detected
* - log is not fully replicated or there are uncommitted entries
@@ -135,9 +135,12 @@ class UAVCAN_EXPORT Server : IAllocationRequestHandler
}
}
virtual void handleAllocationActivityDetection(const ReceivedDataStructure<Allocation>&)
virtual void handleAllocationActivityDetection(const ReceivedDataStructure<Allocation>& msg)
{
raft_core_.forceActiveMode();
if (msg.isAnonymousTransfer())
{
raft_core_.forceActiveMode();
}
}
/*