aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.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/diaspora.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/diaspora.php')
-rw-r--r--include/diaspora.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 5b51314ac..1ae8ca800 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1267,7 +1267,7 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) {
$return_code = $a->get_curl_code();
logger('diaspora_transmit: ' . $logid . ' returns: ' . $return_code);
- if(! $return_code) {
+ if((! $return_code) || (($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))) {
logger('diaspora_transmit: queue message');
// queue message for redelivery
q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`,`batch`)
@@ -1280,5 +1280,6 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) {
);
}
+
return(($return_code) ? $return_code : (-1));
}