diff options
author | Thomas Citharel <tcit@tcit.fr> | 2024-10-10 07:54:46 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2024-10-11 10:57:02 +0200 |
commit | dcd27fd986427a8ccfbf0a9d01568cf7918b7659 (patch) | |
tree | 6bd4336bc64e0071f3ced2a147677c9a6f28c503 /lib/private/Files | |
parent | d013a13eb5b546f2f02ea64a6d64e22eac79cd18 (diff) | |
download | nextcloud-server-add-default-request-timeout-const.tar.gz nextcloud-server-add-default-request-timeout-const.zip |
feat(http-client): expose default request timeout constant to be used instead of magic number 30add-default-request-timeout-const
Will be used to set default where we are able to override the default timeout.
See https://github.com/nextcloud/server/pull/48418
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index e310e4357f1..e0f7700415f 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -20,6 +20,7 @@ use OCP\Files\ForbiddenException; use OCP\Files\IMimeTypeDetector; use OCP\Files\StorageInvalidException; use OCP\Files\StorageNotAvailableException; +use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; use OCP\ICertificateManager; use OCP\IConfig; @@ -124,7 +125,7 @@ class DAV extends Common { $this->logger = Server::get(LoggerInterface::class); $this->eventLogger = Server::get(IEventLogger::class); // This timeout value will be used for the download and upload of files - $this->timeout = Server::get(IConfig::class)->getSystemValueInt('davstorage.request_timeout', 30); + $this->timeout = Server::get(IConfig::class)->getSystemValueInt('davstorage.request_timeout', IClient::DEFAULT_REQUEST_TIMEOUT); $this->mimeTypeDetector = \OC::$server->getMimeTypeDetector(); } |