Merge pull request #6 from ufilesdk-dev/feat/5-http-timeout

http.php curl timeout changed to 20s
This commit is contained in:
ufo2243 2022-09-13 09:42:05 +08:00 committed by GitHub
commit 8c125d0213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ class HTTP_Request
global $UFILE_ACTION_TYPE; global $UFILE_ACTION_TYPE;
if ($CURL_TIMEOUT == null && $action_type !== ActionType::PUTFILE if ($CURL_TIMEOUT == null && $action_type !== ActionType::PUTFILE
&& $action_type !== ActionType::POSTFILE) { && $action_type !== ActionType::POSTFILE) {
$CURL_TIMEOUT = 10; $CURL_TIMEOUT = 20;
} }
$this->Timeout = $CURL_TIMEOUT; $this->Timeout = $CURL_TIMEOUT;
} }
@ -70,7 +70,7 @@ class HTTP_Response
global $CURL_TIMEOUT; global $CURL_TIMEOUT;
if ($CURL_TIMEOUT == null) { if ($CURL_TIMEOUT == null) {
$CURL_TIMEOUT = 10; $CURL_TIMEOUT = 20;
} }
$this->Timeout = $CURL_TIMEOUT; $this->Timeout = $CURL_TIMEOUT;
} }