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>
This commit is contained in:
Roeland Jago Douma 2019-09-02 15:42:48 +02:00
parent 7065bcafc7
commit ca2623e6ad
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 0 deletions

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