]> source.dussan.org Git - nextcloud-server.git/commitdiff
Set a default request timeout
authorRoeland Jago Douma <roeland@famdouma.nl>
Mon, 2 Sep 2019 13:42:48 +0000 (15:42 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 2 Sep 2019 13:42:48 +0000 (15:42 +0200)
This to avoid endless running processes.
A default timeout of 30 seconds should cover the 99% case. If a job need
specific longer time it should set that.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Http/Client/Client.php

index 993b83917fd3a9fa649f5144cd52de905762cfdd..28694f3858502f818109c25ced6604b24beb190c 100644 (file)
@@ -63,6 +63,7 @@ class Client implements IClient {
                $defaults = [
                        RequestOptions::PROXY => $this->getProxyUri(),
                        RequestOptions::VERIFY => $this->getCertBundle(),
+                       RequestOptions::TIMEOUT => 30,
                ];
 
                $options = array_merge($defaults, $options);