aboutsummaryrefslogtreecommitdiffstats
path: root/include/salmon.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-27 19:27:47 -0700
committerFriendika <info@friendika.com>2011-09-27 19:27:47 -0700
commit4f9c072d661939680bd26b366b3c248d94a3b8da (patch)
tree96560ab35365f0a5db968827496693859c6a2a82 /include/salmon.php
parent75af366122fa472c28a4105553646c53ec0a16e7 (diff)
downloadvolse-hubzilla-4f9c072d661939680bd26b366b3c248d94a3b8da.tar.gz
volse-hubzilla-4f9c072d661939680bd26b366b3c248d94a3b8da.tar.bz2
volse-hubzilla-4f9c072d661939680bd26b366b3c248d94a3b8da.zip
requeue deliveries on 503 errors which have 'retry-after' headers
Diffstat (limited to 'include/salmon.php')
-rw-r--r--include/salmon.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/salmon.php b/include/salmon.php
index 9153f8994..3d525f51a 100644
--- a/include/salmon.php
+++ b/include/salmon.php
@@ -187,6 +187,9 @@ EOT;
logger('slapper returned ' . $return_code);
if(! $return_code)
return(-1);
+ if(($return_code == 503) && (stristr($a->get_curl_headers(),'retry-after')))
+ return(-1);
+
return ((($return_code >= 200) && ($return_code < 300)) ? 0 : 1);
}