Skip to content

Commit

Permalink
Close curl connections even if there's an error
Browse files Browse the repository at this point in the history
  • Loading branch information
chibimagic committed Apr 7, 2014
1 parent 9c3a40f commit f8e0fc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public static function Curl($http_type, $full_url, $payload = null, $escape_payl
WebDriver::LogDebug($full_response);
WebDriver::LogDebug("=====");
$error = curl_error($curl);
PHPUnit_Framework_Assert::assertEquals("", $error, "Curl error: $error\nMethod: $http_type\nURL: $full_url\n" . print_r($payload, true));
curl_close($curl);
PHPUnit_Framework_Assert::assertEquals("", $error, "Curl error: $error\nMethod: $http_type\nURL: $full_url\n" . print_r($payload, true));
$response_parts = explode("\r\n\r\n", $full_response, 2);
$response['header'] = $response_parts[0];
if (!empty($response_parts[1])) {
Expand Down

0 comments on commit f8e0fc1

Please sign in to comment.