aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJosh <josh.t.richards@gmail.com>2024-09-13 10:41:28 -0400
committerGitHub <noreply@github.com>2024-09-13 10:41:28 -0400
commitd165405d5b05b1fc4c6c1ed6d3b670a8b3c2712c (patch)
tree63e849f85b32f5b5b044d0ac728ef3757213f6f2 /lib/public
parentdfa994ef28e14b836169ddc0d6208e46123b07a2 (diff)
downloadnextcloud-server-d165405d5b05b1fc4c6c1ed6d3b670a8b3c2712c.tar.gz
nextcloud-server-d165405d5b05b1fc4c6c1ed6d3b670a8b3c2712c.zip
fix(collaboration): Reduce timeouts to 3s for link reference connectsfix/issue-34720
Fixes rest of #34720 https://github.com/nextcloud/server/issues/34720#issuecomment-1286609205 Signed-off-by: Josh <josh.t.richards@gmail.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Collaboration/Reference/LinkReferenceProvider.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/Collaboration/Reference/LinkReferenceProvider.php b/lib/public/Collaboration/Reference/LinkReferenceProvider.php
index 86d2c03918c..65bdcecb577 100644
--- a/lib/public/Collaboration/Reference/LinkReferenceProvider.php
+++ b/lib/public/Collaboration/Reference/LinkReferenceProvider.php
@@ -114,7 +114,7 @@ class LinkReferenceProvider implements IReferenceProvider, IPublicReferenceProvi
$client = $this->clientService->newClient();
try {
- $headResponse = $client->head($reference->getId(), [ 'timeout' => 10 ]);
+ $headResponse = $client->head($reference->getId(), [ 'timeout' => 3 ]);
} catch (\Exception $e) {
$this->logger->debug('Failed to perform HEAD request to get target metadata', ['exception' => $e]);
return;
@@ -136,7 +136,7 @@ class LinkReferenceProvider implements IReferenceProvider, IPublicReferenceProvi
}
try {
- $response = $client->get($reference->getId(), [ 'timeout' => 10, 'stream' => true ]);
+ $response = $client->get($reference->getId(), [ 'timeout' => 3, 'stream' => true ]);
} catch (\Exception $e) {
$this->logger->debug('Failed to fetch link for obtaining open graph data', ['exception' => $e]);
return;
@@ -184,7 +184,7 @@ class LinkReferenceProvider implements IReferenceProvider, IPublicReferenceProvi
$folder = $appData->newFolder('opengraph');
}
- $response = $client->get($object->images[0]->url, ['timeout' => 10]);
+ $response = $client->get($object->images[0]->url, ['timeout' => 3]);
$contentType = $response->getHeader('Content-Type');
$contentLength = $response->getHeader('Content-Length');