Skip to content

Commit

Permalink
remove sleeping retry
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnhind committed Nov 27, 2018
1 parent d3c7f3b commit 5d1eb8e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/CurlRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,8 @@ public static function delete($url, $httpHeaders = array())
*/
protected static function processRequest($ch)
{
# Check for 429 leaky bucket error
while(1) {
$output = curl_exec($ch);
self::$lastHttpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if(self::$lastHttpCode != 429) {
break;
}
usleep(500000);
}
$output = curl_exec($ch);
self::$lastHttpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if (curl_errno($ch)) {
throw new Exception\CurlException(curl_errno($ch) . ' : ' . curl_error($ch));
Expand All @@ -160,4 +153,4 @@ protected static function processRequest($ch)
return $output;
}

}
}

0 comments on commit 5d1eb8e

Please sign in to comment.