Skip to content

Commit

Permalink
Merge pull request #34 from hhxsv5/master
Browse files Browse the repository at this point in the history
Support timeout for SwooleHttp
  • Loading branch information
hhxsv5 authored Mar 22, 2019
2 parents 71bf136 + 952640f commit 42d606d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/GuzzleHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public function request(Request $request, $timeout = 30)
$config = [
'base_uri' => $request->getBaseUri(),
'timeout' => $timeout,
'http_errors' => false,
'connect_timeout' => 30,
'http_errors' => false,
'verify' => empty($this->config['skipVerifyTls']),
];
$client = static::getClient($config);
Expand Down
1 change: 1 addition & 0 deletions src/Http/SwooleHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function request(Request $request, $timeout = 30)

$config = [
'base_uri' => $request->getBaseUri(),
'timeout' => $timeout,
'headers' => $request->getHeaders() + ['Content-Type' => ContentType::JSON],
'use_pool' => true,
'ssl_verify_peer' => empty($this->config['skipVerifyTls']),
Expand Down

0 comments on commit 42d606d

Please sign in to comment.