diff options
author | Dominik Fuchß <develop@fuchss.org> | 2023-06-11 15:16:38 +0200 |
---|---|---|
committer | Daniel <mail@danielkesselberg.de> | 2023-06-13 10:31:33 +0200 |
commit | a4a57409db7500a781f339d52999183de83b6ff7 (patch) | |
tree | 2cae79ef31ba7ce069719e8ee2455221ccd068f3 /lib/private/Files/Storage/DAV.php | |
parent | c3ba871f3633297046341b7760add409063f2512 (diff) | |
download | nextcloud-server-a4a57409db7500a781f339d52999183de83b6ff7.tar.gz nextcloud-server-a4a57409db7500a781f339d52999183de83b6ff7.zip |
Changes after code review.
Signed-off-by: Dominik Fuchß <develop@fuchss.org>
Diffstat (limited to 'lib/private/Files/Storage/DAV.php')
-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 366ab4dda14..a769f799ed3 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); |