aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-25 18:50:28 -0800
committerFriendika <info@friendika.com>2010-11-25 18:50:28 -0800
commitcce73807569187d6633176c5c738cd103e2ec669 (patch)
tree6a166d1324d8b5e956d7888ccd40bfd43635fe42 /include/poller.php
parent60ef474d4607fa48a4b5c4d54cbad2b8e2fe9fef (diff)
downloadvolse-hubzilla-cce73807569187d6633176c5c738cd103e2ec669.tar.gz
volse-hubzilla-cce73807569187d6633176c5c738cd103e2ec669.tar.bz2
volse-hubzilla-cce73807569187d6633176c5c738cd103e2ec669.zip
more optimising when confronted with dead servers
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php
index bc7fc5bb0..d97584ff9 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -121,6 +121,14 @@
// mean the software was uninstalled or the domain expired.
// Will keep trying for one month.
mark_for_death($contact);
+
+ // set the last-update so we don't keep polling
+
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($contact['id'])
+ );
+
continue;
}
@@ -129,7 +137,15 @@
if(intval($res->status) == 1) {
logger("poller: $url replied status 1 - marking for death ");
+
// we may not be friends anymore. Will keep trying for one month.
+ // set the last-update so we don't keep polling
+
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($contact['id'])
+ );
+
mark_for_death($contact);
}
else {