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 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Client/Adapter/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,15 @@ public function connect($host, $port = 80, $secure = false)
curl_setopt($this->curl, CURLOPT_PORT, intval($port));
}

// Set timeout
curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, $this->config['timeout']);
if (isset($this->config['timeout'])) {
// Set timeout
curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, $this->config['timeout']);
}

// Set Max redirects
curl_setopt($this->curl, CURLOPT_MAXREDIRS, $this->config['maxredirects']);
if (isset($this->config['maxredirects'])) {
// Set Max redirects
curl_setopt($this->curl, CURLOPT_MAXREDIRS, $this->config['maxredirects']);
}

if (!$this->curl) {
$this->close();
Expand Down

0 comments on commit 9acc850

Please sign in to comment.