Skip to content

Commit

Permalink
Update APII.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpower678 committed May 25, 2023
1 parent 12c2d23 commit f6cb038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/Core/APII.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,14 @@ private static function makeHTTPRequest( $url, $query = [], $usePOST = false, $u
sleep( $curlLastHeaders['retry-after'][0] );
}

return self::makeHTTPRequest( $url, $query, $usePOST, $useOAuth, $keys, $headers, $metricsArray );
return self::makeHTTPRequest( $url, $query, $usePOST, $useOAuth, $keys, $headers, $metricsArray, $maxAttempts );
}
if( $curlData['http_code'] >= 500 || in_array( $curlData['http_code'], [ 400, 408, 409 ] ) ) {
if( $maxAttempts > 0 && (int) $metricsArray['aggregation_fields']['ra'] >= $maxAttempts ) return null;

sleep( 1 );

return self::makeHTTPRequest( $url, $query, $usePOST, $useOAuth, $keys, $headers, $metricsArray );
return self::makeHTTPRequest( $url, $query, $usePOST, $useOAuth, $keys, $headers, $metricsArray, $maxAttempts );
}

if( !empty( $curlData['redirect_url'] ) ) {
Expand Down

0 comments on commit f6cb038

Please sign in to comment.