Merge remote-tracking branch 'friendika/master'
This commit is contained in:
commit
dccd2da356
15 changed files with 40 additions and 13 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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1042,6 +1042,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
|
|||
if((! $curl_stat) || (! strlen($xml)))
|
||||
return(-1); // timed out
|
||||
|
||||
if(($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))
|
||||
return(-1);
|
||||
|
||||
if(strpos($xml,'<?xml') === false) {
|
||||
logger('dfrn_deliver: phase 2: no valid XML returned');
|
||||
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue