summaryrefslogtreecommitdiffstats
path: root/src/hooks
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2021-09-21 14:22:00 +0200
committerMarcin Siodelski <marcin@isc.org>2021-09-21 14:22:00 +0200
commit68c7ae64b6293e785f739be31197ab208ae0a6b9 (patch)
tree08c66105f9a94ee18f77b027871d81b2ce4b08bf /src/hooks
parent[#1403] Fixed a typo in HA messages (diff)
downloadkea-68c7ae64b6293e785f739be31197ab208ae0a6b9.tar.xz
kea-68c7ae64b6293e785f739be31197ab208ae0a6b9.zip
[#1403] Added a commment in the ha_service
Per review comments.
Diffstat (limited to 'src/hooks')
-rw-r--r--src/hooks/dhcp/high_availability/ha_service.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hooks/dhcp/high_availability/ha_service.cc b/src/hooks/dhcp/high_availability/ha_service.cc
index b57cd68fb4..1192544adf 100644
--- a/src/hooks/dhcp/high_availability/ha_service.cc
+++ b/src/hooks/dhcp/high_availability/ha_service.cc
@@ -1602,6 +1602,14 @@ HAService::processHAReset() {
void
HAService::asyncSendHeartbeat() {
HAConfig::PeerConfigPtr partner_config = config_->getFailoverPeerConfig();
+
+ // If the sync_complete_notified_ is true it means that the partner
+ // notified us that it had completed lease database synchronization.
+ // We confirm that the partner is operational by sending the heartbeat
+ // to it. Regardless if the partner responds to our heartbeats or not,
+ // we should clear this flag. But, since we need the current value in
+ // the async call handler, we save it in the local variable before
+ // clearing it.
bool sync_complete_notified = sync_complete_notified_;
sync_complete_notified_ = false;