Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
5b90475e
Commit
5b90475e
authored
Sep 05, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '
TRADE-501
' into 'master'
fix Closes
TRADE-501
See merge request
!7
parents
7343b717
55cd2b58
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
0 deletions
+9
-0
CurlHttpClient.php
classes/fpf/http/CurlHttpClient.php
+1
-0
SwooleHttpClient.php
classes/fpf/http/SwooleHttpClient.php
+6
-0
SwooleHttpClient.php
classes/fpf/thrift/SwooleHttpClient.php
+1
-0
TCurlClient.php
classes/fpf/thrift/TCurlClient.php
+1
-0
No files found.
classes/fpf/http/CurlHttpClient.php
View file @
5b90475e
...
...
@@ -170,6 +170,7 @@ class CurlHttpClient
curl_close
(
$this
->
curl_handle
);
$this
->
curl_handle
=
null
;
$error
=
'CurlHttpClient: Could not connect to '
.
$full_url
;
\Yii
::
$app
->
fpf
->
error
(
'http'
,
curl_errno
(
$this
->
curl_handle
),
__CLASS__
,
__FUNCTION__
,
' ERROR:'
.
$error
);
throw
new
CurlHttpException
(
$error
,
CurlHttpException
::
NOT_OPEN
);
}
}
...
...
classes/fpf/http/SwooleHttpClient.php
View file @
5b90475e
...
...
@@ -38,6 +38,11 @@ class SwooleHttpClient
protected
$connect_timeout_ms
;
protected
$timeout_ms
;
protected
$method
;
/**
* Http 客户端
*
* @var Client
*/
protected
$curl_handle
;
protected
$response
;
protected
$cookies
=
[];
...
...
@@ -157,6 +162,7 @@ class SwooleHttpClient
if
(
!
$this
->
response
)
{
$this
->
curl_handle
=
null
;
$error
=
'CurlHttpClient: Could not connect to '
.
$full_url
;
\Yii
::
$app
->
fpf
->
error
(
'http'
,
$this
->
curl_handle
->
errCode
,
__CLASS__
,
__FUNCTION__
,
' ERROR:'
.
$error
);
throw
new
SwooleHttpException
(
$error
,
SwooleHttpException
::
NOT_OPEN
);
}
}
...
...
classes/fpf/thrift/SwooleHttpClient.php
View file @
5b90475e
...
...
@@ -228,6 +228,7 @@ class SwooleHttpClient extends \Thrift\Transport\TTransport
// Connect failed?
if
(
!
$this
->
response_
)
{
$error
=
'SwooleHttpClient: Could not connect to '
.
$this
->
scheme_
.
"://"
.
$host
.
$this
->
uri_
;
\Yii
::
$app
->
fpf
->
error
(
'http'
,
$this
->
handle
->
errCode
,
__CLASS__
,
__FUNCTION__
,
' ERROR:'
.
$error
);
throw
new
TTransportException
(
$error
,
TTransportException
::
NOT_OPEN
);
}
}
...
...
classes/fpf/thrift/TCurlClient.php
View file @
5b90475e
...
...
@@ -237,6 +237,7 @@ class TCurlClient extends \Thrift\Transport\TTransport
curl_close
(
$this
->
handle
);
$this
->
handle
=
null
;
$error
=
'TCurlClient: Could not connect to '
.
$full_url
;
\Yii
::
$app
->
fpf
->
error
(
'http'
,
curl_errno
(
$this
->
handle
),
__CLASS__
,
__FUNCTION__
,
' ERROR:'
.
$error
);
throw
new
TTransportException
(
$error
,
TTransportException
::
NOT_OPEN
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment