Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
WangNingkai committed Dec 7, 2018
1 parent 71ba5bc commit 3af3b37
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
/ /_/ / /___/ ___ |_/ // /| / /_/ / /___ / |
\____/_____/_/ |_/___/_/ |_/_____/_____//_/|_|
```
## 2018.12.07

- fix curl:35 错误
```
{"code":35,"msg":"SSL connect error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection toxxx:443"}
```
## 2018.12.06

- 更换核心请求类,优化报错显示
Expand Down
4 changes: 2 additions & 2 deletions app/Helpers/GraphRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ public function request(
$curl = new Curl();
}
$curl->setHeaders($this->headers);
$curl->setRetry(3);
$curl->setConnectTimeout(5);
$curl->setTimeout((int)$this->timeout);
$curl->setUrl($this->endpoint);
$curl->setRetry(3);
$curl->setOpts($options);
$curl->exec();
$curl->close();
if ($curl->error) {
Log::error(
'OneDriveGraph Graph API Err',
'Get OneDrive source content error.',
[
'errno' => $curl->errorCode,
'msg' => $curl->errorMessage,
Expand Down
5 changes: 1 addition & 4 deletions app/Helpers/Tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,15 +446,12 @@ public static function getFileContent($url, $cache = true)
CURLOPT_FAILONERROR => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => 'gzip,deflate',
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYSTATUS => false,
]);
$curl->get($url);
$curl->close();
if ($curl->error) {
Log::error(
'Get OneDriveGraph FileContent Err',
'Get OneDrive file content error.',
[
'code' => $curl->errorCode,
'msg' => $curl->errorMessage,
Expand Down

0 comments on commit 3af3b37

Please sign in to comment.