Permalink
Browse files

Merge pull request #5 from dhazel/feature/enable-curlopt-override

Small change to allow overriding the RETURNTRANSFER curlopt.
  • Loading branch information...
petewarden committed May 15, 2012
2 parents 442fd88 + 9847315 commit fc9e80aa7191d917330750dc3bded1075f6e4f3e
Showing with 2 additions and 2 deletions.
  1. +2 −2 parallelcurl.php
View
@@ -75,9 +75,9 @@ public function startRequest($url, $callback, $user_data = array(), $post_fields
$this->waitForOutstandingRequestsToDropBelow($this->max_requests);
$ch = curl_init();
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt_array($ch, $this->options);
curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
if (isset($post_fields)) {
curl_setopt($ch, CURLOPT_POST, TRUE);
@@ -157,4 +157,4 @@ private function waitForOutstandingRequestsToDropBelow($max)
}
-?>
+?>

0 comments on commit fc9e80a

Please sign in to comment.