mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 17:23:33 +08:00
Raft - ignoring Allocation activity if it is a response
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user