From 6a20e59ac72942f83fcb347b5f82b3508c2890a6 Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Thu, 14 Jun 2018 16:37:43 +0200 Subject: [PATCH] [master] Removed silly limitation of 65 seconds for HA timeout. Okayed on jabber. --- src/hooks/dhcp/high_availability/ha_config.h | 6 +++--- src/hooks/dhcp/high_availability/ha_config_parser.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hooks/dhcp/high_availability/ha_config.h b/src/hooks/dhcp/high_availability/ha_config.h index 12146ad6cf..86f9ded2dd 100644 --- a/src/hooks/dhcp/high_availability/ha_config.h +++ b/src/hooks/dhcp/high_availability/ha_config.h @@ -255,14 +255,14 @@ public: /// @brief Returns timeout for lease database synchronization. /// /// @return Timeout in milliseconds. - long getSyncTimeout() const { + uint32_t getSyncTimeout() const { return (sync_timeout_); } /// @brief Sets new lease database syncing timeout in milliseconds. /// /// @param sync_timeout new timeout for lease database synchornization. - void setSyncTimeout(const long sync_timeout) { + void setSyncTimeout(const uint32_t sync_timeout) { sync_timeout_ = sync_timeout; } @@ -391,7 +391,7 @@ private: HAMode ha_mode_; ///< Mode of operation. bool send_lease_updates_; ///< Send lease updates to partner? bool sync_leases_; ///< Synchronize databases on startup? - long sync_timeout_; ///< Timeout for syncing lease database (ms) + uint32_t sync_timeout_; ///< Timeout for syncing lease database (ms) uint32_t heartbeat_delay_; ///< Heartbeat delay in milliseconds. uint32_t max_response_delay_; ///< Max delay in response to heartbeats. uint32_t max_ack_delay_; ///< Maximum DHCP message ack delay. diff --git a/src/hooks/dhcp/high_availability/ha_config_parser.cc b/src/hooks/dhcp/high_availability/ha_config_parser.cc index 551f1a9113..a6241bd70b 100644 --- a/src/hooks/dhcp/high_availability/ha_config_parser.cc +++ b/src/hooks/dhcp/high_availability/ha_config_parser.cc @@ -111,7 +111,7 @@ HAConfigParser::parseInternal(const HAConfigPtr& config_storage, config_storage->setSyncLeases(getBoolean(c, "sync-leases")); // Get 'sync-timeout'. - uint16_t sync_timeout = getAndValidateInteger(c, "sync-timeout"); + uint32_t sync_timeout = getAndValidateInteger(c, "sync-timeout"); config_storage->setSyncTimeout(sync_timeout); // Get 'heartbeat-delay'. -- 2.47.2