Commit a952dca0 authored by tufengqi's avatar tufengqi

Merge branch 'TRADE-501' into 'master'

fix Closes TRADE-501 See merge request !8
parents 5b90475e 74fadbdd
...@@ -168,9 +168,9 @@ class CurlHttpClient ...@@ -168,9 +168,9 @@ class CurlHttpClient
// Connect failed? // Connect failed?
if (!$this->response) { if (!$this->response) {
curl_close($this->curl_handle); curl_close($this->curl_handle);
$this->curl_handle = null;
$error = 'CurlHttpClient: Could not connect to ' . $full_url; $error = 'CurlHttpClient: Could not connect to ' . $full_url;
\Yii::$app->fpf->error('http', curl_errno($this->curl_handle), __CLASS__, __FUNCTION__, ' ERROR:' .$error); \Yii::$app->fpf->error('http', curl_errno($this->curl_handle), __CLASS__, __FUNCTION__, ' ERROR:' .$error);
$this->curl_handle = null;
throw new CurlHttpException($error, CurlHttpException::NOT_OPEN); throw new CurlHttpException($error, CurlHttpException::NOT_OPEN);
} }
} }
......
...@@ -235,9 +235,9 @@ class TCurlClient extends \Thrift\Transport\TTransport ...@@ -235,9 +235,9 @@ class TCurlClient extends \Thrift\Transport\TTransport
// Connect failed? // Connect failed?
if (!$this->response_) { if (!$this->response_) {
curl_close($this->handle); curl_close($this->handle);
$this->handle = null;
$error = 'TCurlClient: Could not connect to ' . $full_url; $error = 'TCurlClient: Could not connect to ' . $full_url;
\Yii::$app->fpf->error('http', curl_errno($this->handle), __CLASS__, __FUNCTION__, ' ERROR:' .$error); \Yii::$app->fpf->error('http', curl_errno($this->handle), __CLASS__, __FUNCTION__, ' ERROR:' .$error);
$this->handle = null;
throw new TTransportException($error, TTransportException::NOT_OPEN); throw new TTransportException($error, TTransportException::NOT_OPEN);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment