Browse Source

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>
pull/16972/head
Roeland Jago Douma 6 years ago
parent
commit
ca2623e6ad
No known key found for this signature in database GPG Key ID: F941078878347C0C
  1. 1
      lib/private/Http/Client/Client.php

1
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);

Loading…
Cancel
Save