private function CurlMulti::createMultiHandle

Create the new cURL multi handle with error checking

2 calls to CurlMulti::createMultiHandle()
CurlMulti::reset in drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlMulti.php
Reset the state and remove any attached RequestInterface objects
CurlMulti::__construct in drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlMulti.php

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlMulti.php, line 625

Class

CurlMulti
Send { This implementation allows callers to send blocking requests that return back to the caller when their requests complete, regardless of whether or not previously sending requests in the curl_multi object have completed. The implementation…

Namespace

Guzzle\Http\Curl

Code

private function createMultiHandle() {
  if ($this->multiHandle && is_resource($this->multiHandle)) {
    curl_multi_close($this->multiHandle);
  }
  $this->requests = array();
  $this->multiHandle = curl_multi_init();
  $this->handles = new \SplObjectStorage();
  $this->resourceHash = array();
  $this->removeHandles = array();

  // @codeCoverageIgnoreStart
  if ($this->multiHandle === false) {
    throw new CurlException('Unable to create multi handle');
  }

  // @codeCoverageIgnoreEnd
}