X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fsalmon.php;h=6675849ce4198f5d701998665c61ebd2ac8797f0;hb=0cd9db9cb7f4c96f597e37590a536eaae123238d;hp=6e08d0aaf2bac22516ef3dd38864665b144cb7f8;hpb=4a473611163a12b48d3bbad71dc54765be8789f9;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); }