diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-09-02 15:42:48 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-09-02 15:42:48 +0200 |
commit | ca2623e6ad4f7d838a61c71ba828b44b3b7331ab (patch) | |
tree | 9ed815ef1682ed6938624b03e0c3a327af038095 /lib/private/Http | |
parent | 7065bcafc72ccb718058bdc3e01405a9adcbbf71 (diff) | |
download | nextcloud-server-ca2623e6ad4f7d838a61c71ba828b44b3b7331ab.tar.gz nextcloud-server-ca2623e6ad4f7d838a61c71ba828b44b3b7331ab.zip |
Set a default request timeout
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>
Diffstat (limited to 'lib/private/Http')
-rw-r--r-- | lib/private/Http/Client/Client.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index 993b83917fd..28694f38585 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -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); |