mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:05:19 +02:00
requeue deliveries on 503 errors which have 'retry-after' headers
This commit is contained in:
parent
75af366122
commit
4f9c072d66
4 changed files with 9 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue