Permalink
Browse files

add attribute timeout

  • Loading branch information...
1 parent 9fe9c9b commit fb21d093c0540a0679fb710c437fedb2cfda6e1c @mmicael committed Oct 28, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 bc-mapi.php
View
@@ -67,6 +67,7 @@ class BCMAPI
private $media_delivery = 'default';
private $secure = FALSE;
private $show_notices = FALSE;
+ private $timeout = 15;
private $timeout_attempts = 100;
private $timeout_current = 0;
private $timeout_delay = 1;
@@ -1354,7 +1355,7 @@ private function curlRequest($request, $get_request = FALSE)
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
}
// Add curl timeout
- curl_setopt($curl, CURLOPT_TIMEOUT, 15);
+ curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);

0 comments on commit fb21d09

Please sign in to comment.