diff --git a/src/hooks/dhcp/high_availability/ha_service.cc b/src/hooks/dhcp/high_availability/ha_service.cc index 72c669fc81..52f1cf1874 100644 --- a/src/hooks/dhcp/high_availability/ha_service.cc +++ b/src/hooks/dhcp/high_availability/ha_service.cc @@ -963,7 +963,6 @@ void HAService::updatePendingRequestInternal(QueryPtrType& query) { if (pending_requests_.count(query) == 0) { pending_requests_[query] = 1; - } else { ++pending_requests_[query]; } diff --git a/src/hooks/dhcp/high_availability/ha_service.h b/src/hooks/dhcp/high_availability/ha_service.h index 448b11962e..7061476f03 100644 --- a/src/hooks/dhcp/high_availability/ha_service.h +++ b/src/hooks/dhcp/high_availability/ha_service.h @@ -933,7 +933,7 @@ protected: /// @param [out] parking_lot Parking lot where the query is parked. /// This method uses this handle to unpark the packet when all asynchronous /// requests have been completed. - /// @return True when all lease updates are complete, false otherwise. + /// @return When all lease updates are complete returns true, false otherwise. template bool leaseUpdateComplete(QueryPtrType& query, const hooks::ParkingLotHandlePtr& parking_lot); @@ -962,19 +962,23 @@ private: /// - if there was one remove the query from the map /// - return true /// + /// Should be called in a thread safe context. + /// /// @tparam QueryPtrType Type of the pointer to the DHCP client's message, /// i.e. Pkt4Ptr or Pkt6Ptr. /// @param query Pointer to the DHCP client's query. /// @param [out] parking_lot Parking lot where the query is parked. /// This method uses this handle to unpark the packet when all asynchronous /// requests have been completed. - /// @return True when all lease updates are complete, false otherwise. + /// @return When all lease updates are complete returns true, false otherwise. template bool leaseUpdateCompleteInternal(QueryPtrType& query, const hooks::ParkingLotHandlePtr& parking_lot); /// @brief Update pending request counter for this query. /// + /// Should be called in a thread safe context. + /// /// @tparam QueryPtrType Type of the pointer to the DHCP client's message, /// i.e. Pkt4Ptr or Pkt6Ptr. /// @param query Pointer to the DHCP client's query.