Skip to content

Commit

Permalink
Set a default request timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rullzer committed Sep 2, 2019
1 parent 7065bca commit ca2623e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Http/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private function buildRequestOptions(array $options): array {
$defaults = [
RequestOptions::PROXY => $this->getProxyUri(),
RequestOptions::VERIFY => $this->getCertBundle(),
RequestOptions::TIMEOUT => 30,
];

$options = array_merge($defaults, $options);
Expand Down

3 comments on commit ca2623e

@TP75
Copy link

@TP75 TP75 commented on ca2623e Nov 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#17808

Please consider a value like 120 (as in the b.m. example) or a more reasonable value to avoid download drop-outs reported by several users in recent times.

Have a look at the NC forum and certainly:

https://help.nextcloud.com/t/downloading-certain-apps-not-working/62603/11

@rscircus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@rscircus
Copy link

@rscircus rscircus commented on ca2623e Dec 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being on a crappy network this stops you from installing anything. Edited it myself to 120, as suggested by @TP75 in my docker container on my pi somewhere in the remotest corner of the wifi network and things work.

Please sign in to comment.