X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fsalmon.php;h=6675849ce4198f5d701998665c61ebd2ac8797f0;hb=9f2196aa1aa0dc112e3fc238832828d4e22fe137;hp=6e08d0aaf2bac22516ef3dd38864665b144cb7f8;hpb=7a9456d5ac2e73229b2237074c700731c63661a6;p=friendica.git diff --git a/include/salmon.php b/include/salmon.php index 6e08d0aaf2..6675849ce4 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -170,11 +170,14 @@ function slapper($owner, $url, $slap) { } logger('slapper for '.$url.' returned ' . $return_code); + if (! $return_code) { - return(-1); + return -1; } + if (($return_code == 503) && (stristr($a->get_curl_headers(), 'retry-after'))) { - return(-1); + return -1; } + return ((($return_code >= 200) && ($return_code < 300)) ? 0 : 1); }