From d43bb54db46664387112d05b2a9be7b5a0ff79e3 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Thu, 14 Oct 2010 11:03:11 +0200 Subject: [PATCH] Set last webcheck timestamp early so we don't trash the server in case of an error (and keep quiet for the defined idle period) --- src/ip_addr_helper.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ip_addr_helper.cpp b/src/ip_addr_helper.cpp index 8628cb9..429356a 100644 --- a/src/ip_addr_helper.cpp +++ b/src/ip_addr_helper.cpp @@ -409,6 +409,9 @@ string IPAddrHelper::webcheck_ip(bool changed_to_online) return ""; } + // Set the LastWebcheck time to current time. + LastWebcheck = current_time; + // If perform_curl_operation returns a connection problem indicating return code, try the next ip webcheck url if there is one. while ( (curl_err_code == 1) && (url_list.size() != 0) && (url_list.front() != "") ) { @@ -451,9 +454,6 @@ string IPAddrHelper::webcheck_ip(bool changed_to_online) return ""; } - // Set the LastWebcheck time to current time. - LastWebcheck = current_time; - // If IP is within a private range then return "" if ( is_local_ipv4(ip_addr) ) { -- 1.7.1