Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Client/Adapter/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ public function setOptions($options = array())
* @param string $host
* @param int $port
* @param boolean $secure
* @throws AdapterException\RuntimeException
*/
public function connect($host, $port = 80, $secure = false)
{
// If no proxy is set, fall back to Socket adapter
if (! $this->config['proxy_host']) {
return parent::connect($host, $port, $secure);
parent::connect($host, $port, $secure);
return;
}

/* Url might require stream context even if proxy connection doesn't */
Expand All @@ -99,7 +101,7 @@ public function connect($host, $port = 80, $secure = false)
}

// Connect (a non-secure connection) to the proxy server
return parent::connect(
parent::connect(
$this->config['proxy_host'],
$this->config['proxy_port'],
false
Expand Down

0 comments on commit ecd96ec

Please sign in to comment.