to avoid going down in congested line scenario, also need longer ping timeout
[pingcheck] / src / host / pingscheduler.h
index 2916058..91da6e6 100644 (file)
@@ -65,7 +65,8 @@ public:
             LinkStatusItem link_analyzer,
             const int first_delay,
             const int n_parallel_pings,
-            const int parallel_ping_delay
+            const int parallel_ping_delay,
+            const int ping_timeout_factor
     );
     ~PingScheduler();
 
@@ -129,7 +130,9 @@ private:
     /// Keeps track of the time when the last ping was send
     boost::posix_time::ptime TimeSentLastPing;
     /// time threshold for ping
-    const int PingReplyTimeout;
+    int PingReplyTimeout;
+    /// time threshold for ping -- original value
+    const int PingReplyTimeoutOrig;
     /// Object responsible to evaluate the status of the host
     HostStatus HostAnalyzer;
     /// The Dns resolver
@@ -148,6 +151,7 @@ private:
     std::string LogPrefix;
     /// Flag whether DNS resolution has failed so we have to run on outdated IPs
     bool ContinueOnOutdatedIps;
+    int PingTimeoutFactor;
 };
 
 //-----------------------------------------------------------------------------