src/Guzzle/Http/Curl/CurlMultiProxy.php
protected function cleanupHandles()
    {
        if ($diff = max(0, count($this->handles) - $this->maxHandles)) {
            for ($i = count($this->handles) - 1; $i > 0 && $diff > 0; $i--) {
                if (!count($this->handles[$i])) {
                    unset($this->handles[$i]);
                    $diff--;
                }
            }
            $this->handles = array_values($this->handles);
        }
    }
protected function cleanupHandles()
    {
        if ($diff = max(0, count($this->handles) - $this->maxHandles)) {
            for ($i = count($this->handles) - 1; $i > 0 && $diff > 0; $i--) {
                if (!count($this->handles[$i])) {
                    unset($this->handles[$i]);
                    $diff--;
                }
            }
            $this->handles = array_values($this->handles);
        }
    }
protected function cleanupHandles ( ) { if ( $ diff = max ( 0 , count ( $ this -> handles ) - $ this -> maxHandles ) ) { for ( $ i = count ( $ this -> handles ) - 1 ; $ i > 0 && $ diff > 0 ; $ i -- ) { if ( ! count ( $ this -> handles [ $ i ] ) ) { unset ( $ this -> handles [ $ i ] ) ; $ diff -- ; } } $ this -> handles = array_values ( $ this -> handles ) ; } }
Trims down unused CurlMulti handles to limit the number of open connections
Trims down unused CurlMulti handles to limit the number of open connections