fixed bug: correctly handle case when never had any IP and DNS fails
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 20 May 2015 15:20:50 +0000 (17:20 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 20 May 2015 15:20:50 +0000 (17:20 +0200)
src/host/pingscheduler.cpp

index 664ad14..179a70b 100644 (file)
@@ -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);