Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensuring that the sleep value is a positive value.

  • Loading branch information...
commit e851017f5b8100c6703ad3f2c00ebc680de00046 1 parent 0a8ca01
@jmathai jmathai authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 EpiCurl.php
View
4 EpiCurl.php
@@ -67,14 +67,14 @@ public function getResult($key = null)
while($this->running && ($this->execStatus == CURLM_OK || $this->execStatus == CURLM_CALL_MULTI_PERFORM))
{
usleep($outerSleepInt);
- $outerSleepInt *= $this->sleepIncrement;
+ $outerSleepInt = max(1, ($outerSleepInt*$this->sleepIncrement));
$ms=curl_multi_select($this->mc, 0);
if($ms > 0)
{
do{
$this->execStatus = curl_multi_exec($this->mc, $this->running);
usleep($innerSleepInt);
- $innerSleepInt *= $this->sleepIncrement;
+ $innerSleepInt = max(1, ($innerSleepInt*$this->sleepIncrement));
}while($this->execStatus==CURLM_CALL_MULTI_PERFORM);
$innerSleepInt = 1;
}
Please sign in to comment.
Something went wrong with that request. Please try again.