From 87bb99667e5515a430cf740a1959974acb632c32 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 6 May 2014 22:13:56 +0100 Subject: [PATCH] Revert "FIX: allow CURLOPT_CONNECTTIMEOUT to be configured." This reverts commit 0d493d4effb8994480976dee7042c498f2057df9. --- api/RestfulService.php | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/api/RestfulService.php b/api/RestfulService.php index 5f8d7ae29..76508a132 100644 --- a/api/RestfulService.php +++ b/api/RestfulService.php @@ -1,21 +1,17 @@ Version(); $curlOptions = $curlOptions + (array)$this->config()->default_curl_options; @@ -224,7 +221,7 @@ class RestfulService extends ViewableData { curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->getConnectTimeout()); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); if(!ini_get('open_basedir')) curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); @@ -556,31 +553,6 @@ class RestfulService extends ViewableData { return $output; } - - /** - * Set the connection timeout for the curl request in seconds. - * - * @see http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCONNECTTIMEOUT - * - * @param int - * - * @return RestfulService - */ - public function setConnectTimeout($timeout) { - $this->connectTimeout = $timeout; - - return $this; - } - - /** - * Return the connection timeout value. - * - * @return int - */ - public function getConnectTimeout() { - return $this->connectTimeout; - } - } /**