diff options
author | ramon <ramongomez@us.es> | 2017-11-14 12:13:51 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-11-14 12:13:51 +0000 |
commit | 04319fb542c0642a738560c9ffc84d97e85db466 (patch) | |
tree | 4043913db0516e056e62ab346eca9f41e280e6be /admin/WebConsole/includes/restfunctions.php | |
parent | 1777170eab1ea72c56a8958812f29ff46f0d6a66 (diff) |
#799: Bajar el timeout de conexión REST a 200 ms.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5508 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/includes/restfunctions.php')
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 93ef3e84..afff311c 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -4,10 +4,10 @@ * @function multiRequest. * @param URLs array (may include header and POST data), cURL options array. * @return Array of arrays with JSON requests and response codes. - * @warning Does not verifies server certificate. + * @warning Default options: does not verifying certificate, connection timeout 200 ms. * @Date 2015-10-14 */ -function multiRequest($data, $options=array(CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false)) { +function multiRequest($data, $options=array(CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_TIMEOUT_MS => 200)) { // array of curl handles $curly = array(); @@ -33,7 +33,6 @@ function multiRequest($data, $options=array(CURLOPT_SSL_VERIFYHOST => false, CUR curl_setopt($curly[$id], CURLOPT_HEADER, 0); } curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curly[$id], CURLOPT_TIMEOUT, 1); // post? if (is_array($d)) { |