Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Casting value to usleep to int.
Browse files Browse the repository at this point in the history
Closes gh-72.
  • Loading branch information
jmathai committed Sep 25, 2010
1 parent b468694 commit 360e37e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EpiCurl.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ public function getResult($key = null)
$innerSleepInt = $outerSleepInt = 1; $innerSleepInt = $outerSleepInt = 1;
while($this->running && ($this->execStatus == CURLM_OK || $this->execStatus == CURLM_CALL_MULTI_PERFORM)) while($this->running && ($this->execStatus == CURLM_OK || $this->execStatus == CURLM_CALL_MULTI_PERFORM))
{ {
usleep($outerSleepInt); usleep(intval($outerSleepInt));
$outerSleepInt = intval(max(1, ($outerSleepInt*$this->sleepIncrement))); $outerSleepInt = intval(max(1, ($outerSleepInt*$this->sleepIncrement)));
$ms=curl_multi_select($this->mc, 0); $ms=curl_multi_select($this->mc, 0);
if($ms > 0) if($ms > 0)
{ {
do{ do{
$this->execStatus = curl_multi_exec($this->mc, $this->running); $this->execStatus = curl_multi_exec($this->mc, $this->running);
usleep($innerSleepInt); usleep(intval($innerSleepInt));
$innerSleepInt = intval(max(1, ($innerSleepInt*$this->sleepIncrement))); $innerSleepInt = intval(max(1, ($innerSleepInt*$this->sleepIncrement)));
}while($this->execStatus==CURLM_CALL_MULTI_PERFORM); }while($this->execStatus==CURLM_CALL_MULTI_PERFORM);
$innerSleepInt = 1; $innerSleepInt = 1;
Expand Down

0 comments on commit 360e37e

Please sign in to comment.