Skip to content

Commit

Permalink
Merge pull request #107 from wyrmling/master
Browse files Browse the repository at this point in the history
quick fix for CURLMOPT_MAX_HOST_CONNECTIONS
  • Loading branch information
edamov authored Jun 4, 2020
2 parents c8d48ff + ecae61f commit b69afbc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ public function push(): array
define('CURLPIPE_MULTIPLEX', 2);
}

if (!defined('CURLMOPT_MAX_HOST_CONNECTIONS')) {
define('CURLMOPT_MAX_HOST_CONNECTIONS', 7);
}

curl_multi_setopt($this->curlMultiHandle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
curl_multi_setopt($this->curlMultiHandle, CURLMOPT_MAX_HOST_CONNECTIONS, $this->maxConcurrentConnections);
if (defined('CURLMOPT_MAX_HOST_CONNECTIONS')) {
curl_multi_setopt($this->curlMultiHandle, CURLMOPT_MAX_HOST_CONNECTIONS, $this->maxConcurrentConnections);
}
}

$mh = $this->curlMultiHandle;
Expand Down

0 comments on commit b69afbc

Please sign in to comment.