Permalink
Browse files

added connection timeout option, version bump

  • Loading branch information...
thousandsofthem committed Sep 7, 2012
1 parent e2c1dce commit 21c7d143940ed99755eec7ab9cea13baa78c424c
Showing with 3 additions and 1 deletion.
  1. +3 −1 IronCore.class.php
View
@@ -11,7 +11,7 @@
*/
class IronCore{
- protected $core_version = '0.0.2';
+ protected $core_version = '0.0.3';
// should be overridden by child class
protected $client_version = null;
@@ -44,6 +44,7 @@ class IronCore{
public $max_retries = 5;
public $debug_enabled = false;
public $ssl_verifypeer = true;
+ public $connection_timeout = 60;
protected static function dateRfc3339($timestamp = 0) {
@@ -208,6 +209,7 @@ protected function apiCall($type, $url, $params = array(), $raw_post_data = null
curl_setopt($s, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
curl_setopt($s, CURLOPT_RETURNTRANSFER, true);
curl_setopt($s, CURLOPT_HTTPHEADER, $this->compiledHeaders());
+ curl_setopt($s, CURLOPT_CONNECTTIMEOUT, $this->connection_timeout);
return $this->callWithRetries($s);
}

0 comments on commit 21c7d14

Please sign in to comment.