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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Client/Adapter/Proxy.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,14 @@ public function setOptions($options = array())
8585
* @param string $host
8686
* @param int $port
8787
* @param boolean $secure
88+
* @throws AdapterException\RuntimeException
8889
*/
8990
public function connect($host, $port = 80, $secure = false)
9091
{
9192
// If no proxy is set, fall back to Socket adapter
9293
if (! $this->config['proxy_host']) {
93-
return parent::connect($host, $port, $secure);
94+
parent::connect($host, $port, $secure);
95+
return;
9496
}
9597

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

101103
// Connect (a non-secure connection) to the proxy server
102-
return parent::connect(
104+
parent::connect(
103105
$this->config['proxy_host'],
104106
$this->config['proxy_port'],
105107
false

0 commit comments

Comments
 (0)