From b44a5f96f1769c74123f84f687a2030e3f79b524 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Wed, 20 May 2015 17:20:50 +0200 Subject: [PATCH] fixed bug: correctly handle case when never had any IP and DNS fails --- src/host/pingscheduler.cpp | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/host/pingscheduler.cpp b/src/host/pingscheduler.cpp index 664ad14..179a70b 100644 --- a/src/host/pingscheduler.cpp +++ b/src/host/pingscheduler.cpp @@ -199,14 +199,10 @@ void PingScheduler::ping_when_ready() ip = Resolver->get_next_ip(check_up_to_date); } if ( !ip.is_valid() ) - { // still no valid IP --> should not happen - GlobalLogger.error() << LogPrefix << "Not even outdated IP to ping " - << "-- this should not have happened!! Treat like a failed ping."; - if (DnsMaster::get_instance()->get_resolved_ip_ttl_threshold() > 0) - GlobalLogger.warning() << LogPrefix << "This probably happened " - << "because you specified a TTL threshold > 0 but resolving" - << " had no effect on TTLs since external cache is only " - << "updated when TTL=0 is reached."; + { // Do not even have an outdated IP! + // This happens if have no cached IPs and resolve failed + GlobalLogger.info() << LogPrefix << "Not even outdated IP to ping " + << "-- treat like a failed ping."; // skip the ping and directly call ping_done_handler ping_done_handler(false); -- 1.7.1