diff options
author | Dominik Fuchß <develop@fuchss.org> | 2023-06-11 15:16:38 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-06-14 20:27:39 +0000 |
commit | a6ca1546cc76cde83e9de555f0d99cac71dc13a3 (patch) | |
tree | a9638b495e776b368be6782007fb42aa81d43cf8 /lib | |
parent | c64e9f6e93b75bf0c545922bb0ca2e1f43197af6 (diff) | |
download | nextcloud-server-a6ca1546cc76cde83e9de555f0d99cac71dc13a3.tar.gz nextcloud-server-a6ca1546cc76cde83e9de555f0d99cac71dc13a3.zip |
Changes after code review.
Signed-off-by: Dominik Fuchß <develop@fuchss.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index d17d01879bf..3d9fab6d8a3 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -93,6 +93,9 @@ class DAV extends Common { protected LoggerInterface $logger; protected IEventLogger $eventLogger; + /** @var int */ + private $timeout; + /** * @param array $params * @throws \Exception @@ -135,6 +138,8 @@ class DAV extends Common { } $this->logger = \OC::$server->get(LoggerInterface::class); $this->eventLogger = \OC::$server->get(IEventLogger::class); + // This timeout value will be used for the download and upload of files + $this->timeout = \OC::$server->getConfig()->getSystemValueInt('davstorage.request_timeout', 30); } protected function init() { @@ -375,7 +380,7 @@ class DAV extends Common { 'auth' => [$this->user, $this->password], 'stream' => true, // set download timeout for users with slow connections or large files - 'timeout' => \OC::$server->getConfig()->getSystemValueInt('remote_curl_timeout', 30) + 'timeout' => $this->timeout ]); } catch (\GuzzleHttp\Exception\ClientException $e) { if ($e->getResponse() instanceof ResponseInterface @@ -534,7 +539,7 @@ class DAV extends Common { 'body' => $source, 'auth' => [$this->user, $this->password], // set upload timeout for users with slow connections or large files - 'timeout' => \OC::$server->getConfig()->getSystemValueInt('remote_curl_timeout', 30) + 'timeout' => $this->timeout ]); $this->removeCachedFile($target); |