Skip to content

Commit

Permalink
fixed edge case where the first request above the window size would b…
Browse files Browse the repository at this point in the history
…e lost
  • Loading branch information
joshfraz committed Dec 3, 2009
1 parent 844d8ed commit 5bde4b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RollingCurl.php
Expand Up @@ -166,9 +166,9 @@ private function rolling_curl($window_size = null) {
$callback($output, $info);

// start a new request (it's important to do this before removing the old one)
if ($i < sizeof($this->requests) && isset($this->requests[$i++]) && $i < count($this->requests)) {
if ($i < sizeof($this->requests) && isset($this->requests[$i]) && $i < count($this->requests)) {
$ch = curl_init();
$options = $this->get_options($this->requests[$i]);
$options = $this->get_options($this->requests[$i++]);
curl_setopt_array($ch,$options);
curl_multi_add_handle($master, $ch);
}
Expand Down

0 comments on commit 5bde4b3

Please sign in to comment.