Just some more fixed notice
This commit is contained in:
parent
9a6a3bf1c1
commit
5c63de1692
2 changed files with 9 additions and 9 deletions
|
@ -119,7 +119,7 @@ class Probe
|
||||||
|
|
||||||
if (!is_object($xrd)) {
|
if (!is_object($xrd)) {
|
||||||
$ret = Network::curl($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
|
$ret = Network::curl($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
logger("Probing timeout for ".$url, LOGGER_DEBUG);
|
logger("Probing timeout for ".$url, LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -731,7 +731,7 @@ class Probe
|
||||||
$redirects = 0;
|
$redirects = 0;
|
||||||
|
|
||||||
$ret = Network::curl($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => $type]);
|
$ret = Network::curl($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => $type]);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$data = $ret['body'];
|
$data = $ret['body'];
|
||||||
|
@ -798,7 +798,7 @@ class Probe
|
||||||
private static function pollNoscrape($noscrape_url, $data)
|
private static function pollNoscrape($noscrape_url, $data)
|
||||||
{
|
{
|
||||||
$ret = Network::curl($noscrape_url);
|
$ret = Network::curl($noscrape_url);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$content = $ret['body'];
|
$content = $ret['body'];
|
||||||
|
@ -1036,7 +1036,7 @@ class Probe
|
||||||
private static function pollHcard($hcard_url, $data, $dfrn = false)
|
private static function pollHcard($hcard_url, $data, $dfrn = false)
|
||||||
{
|
{
|
||||||
$ret = Network::curl($hcard_url);
|
$ret = Network::curl($hcard_url);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$content = $ret['body'];
|
$content = $ret['body'];
|
||||||
|
@ -1283,7 +1283,7 @@ class Probe
|
||||||
}
|
}
|
||||||
} elseif (normalise_link($pubkey) == 'http://') {
|
} elseif (normalise_link($pubkey) == 'http://') {
|
||||||
$ret = Network::curl($pubkey);
|
$ret = Network::curl($pubkey);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$pubkey = $ret['body'];
|
$pubkey = $ret['body'];
|
||||||
|
@ -1315,7 +1315,7 @@ class Probe
|
||||||
|
|
||||||
// Fetch all additional data from the feed
|
// Fetch all additional data from the feed
|
||||||
$ret = Network::curl($data["poll"]);
|
$ret = Network::curl($data["poll"]);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$feed = $ret['body'];
|
$feed = $ret['body'];
|
||||||
|
@ -1525,7 +1525,7 @@ class Probe
|
||||||
private static function feed($url, $probe = true)
|
private static function feed($url, $probe = true)
|
||||||
{
|
{
|
||||||
$ret = Network::curl($url);
|
$ret = Network::curl($url);
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$feed = $ret['body'];
|
$feed = $ret['body'];
|
||||||
|
|
|
@ -185,7 +185,7 @@ class OnePoll
|
||||||
|
|
||||||
$ret = Network::curl($url);
|
$ret = Network::curl($url);
|
||||||
|
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
// set the last-update so we don't keep polling
|
// set the last-update so we don't keep polling
|
||||||
dba::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
|
dba::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
|
||||||
Contact::markForArchival($contact);
|
Contact::markForArchival($contact);
|
||||||
|
@ -321,7 +321,7 @@ class OnePoll
|
||||||
$ret = Network::curl($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
|
$ret = Network::curl($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
|
||||||
unlink($cookiejar);
|
unlink($cookiejar);
|
||||||
|
|
||||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
if (!$ret["success"] && ($ret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
|
||||||
// set the last-update so we don't keep polling
|
// set the last-update so we don't keep polling
|
||||||
dba::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
|
dba::update('contact', ['last-update' => DateTimeFormat::utcNow()], ['id' => $contact['id']]);
|
||||||
Contact::markForArchival($contact);
|
Contact::markForArchival($contact);
|
||||||
|
|
Loading…
Reference in a new issue