Move proxy code inside if (->connected)

This commit is contained in:
Richard van den Berg 2015-03-19 09:13:14 +01:00 committed by mark_story
parent 7704efdb28
commit 15c80f7c3d

View file

@ -169,7 +169,6 @@ class CakeSocket {
$this->connected = is_resource($this->connection);
if ($this->connected) {
stream_set_timeout($this->connection, $this->config['timeout']);
}
if (!empty($this->config['request']) && $this->config['request']['uri']['scheme'] === 'https' && !empty($this->config['proxy'])) {
$req = array();
@ -188,7 +187,7 @@ class CakeSocket {
$this->enableCrypto('tls', 'client');
}
}
return $this->connected;
}