using namespace std;
+/// Server error threshold: When the host IP is not current, the DNS TTL expired
+/// and we already sent an update.
+const int ServerErrorTTLExpiredThreshold = 15 * 60;
+
+
/**
* Default constructor which initializes the member Conf.
*/
else
{
int dns_cache_ttl = service->get_dns_cache_ttl();
+
+ // Add server error threshold so we don't jam the server with updates for the same IP
+ // in case the server doesn't hand out the already sent IP via DNS
+ // (might indicate a server error).
+ dns_cache_ttl += ServerErrorTTLExpiredThreshold;
+
// Check if DNS Cache TTL is expired, if so, then update the same IP again.
if ( (lastupdated + dns_cache_ttl) < current_time )
{