more optimising when confronted with dead servers
This commit is contained in:
parent
60ef474d46
commit
cce7380756
|
@ -121,6 +121,14 @@
|
||||||
// mean the software was uninstalled or the domain expired.
|
// mean the software was uninstalled or the domain expired.
|
||||||
// Will keep trying for one month.
|
// Will keep trying for one month.
|
||||||
mark_for_death($contact);
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +137,15 @@
|
||||||
|
|
||||||
if(intval($res->status) == 1) {
|
if(intval($res->status) == 1) {
|
||||||
logger("poller: $url replied status 1 - marking for death ");
|
logger("poller: $url replied status 1 - marking for death ");
|
||||||
|
|
||||||
// we may not be friends anymore. Will keep trying for one month.
|
// 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);
|
mark_for_death($contact);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -39,7 +39,8 @@ function pubsub_init(&$a) {
|
||||||
$hub_lease = ((x($_GET,'hub_lease_seconds')) ? notags(trim($_GET['hub_lease_seconds'])) : '');
|
$hub_lease = ((x($_GET,'hub_lease_seconds')) ? notags(trim($_GET['hub_lease_seconds'])) : '');
|
||||||
$hub_verify = ((x($_GET,'hub_verify_token')) ? notags(trim($_GET['hub_verify_token'])) : '');
|
$hub_verify = ((x($_GET,'hub_verify_token')) ? notags(trim($_GET['hub_verify_token'])) : '');
|
||||||
|
|
||||||
logger('pubsub: Subscription from' . $_SERVER['REMOTE_ADDR'] . print_r($_GET,true));
|
logger('pubsub: Subscription from ' . $_SERVER['REMOTE_ADDR']);
|
||||||
|
logger('pubsub: data: ' . print_r($_GET,true), LOGGER_DATA);
|
||||||
|
|
||||||
$subscribe = (($hub_mode === 'subscribe') ? 1 : 0);
|
$subscribe = (($hub_mode === 'subscribe') ? 1 : 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue