Skip to content

Commit

Permalink
Http Client v4 with no pooling. (TEST)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilge committed Nov 17, 2020
1 parent c8730d5 commit e4f17af
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/AsyncHttpConnector.php
Expand Up @@ -27,20 +27,16 @@ class AsyncHttpConnector implements AsyncConnector

private $cookieJar;

private $pool;

public function __construct(AsyncHttpOptions $options = null, CookieJar $cookieJar = null)
{
$this->options = $options ?: new AsyncHttpOptions;
$this->cookieJar = $cookieJar ?: new InMemoryCookieJar;
$this->pool = new UnlimitedConnectionPool();
}

public function __clone()
{
$this->options = clone $this->options;
$this->cookieJar = clone $this->cookieJar;
// Sharing the pool is intended and should be harmless.
}

public function fetchAsync(AsyncDataSource $source): Promise
Expand Down Expand Up @@ -80,7 +76,6 @@ public function fetchAsync(AsyncDataSource $source): Promise
private function createClient(): HttpClient
{
return (new HttpClientBuilder())
->usingPool($this->pool)
->interceptNetwork(new CookieInterceptor($this->cookieJar))
->followRedirects($this->options->getMaxRedirects())
// We have our own retry implementation.
Expand Down

0 comments on commit e4f17af

Please sign in to comment.