From ca2623e6ad4f7d838a61c71ba828b44b3b7331ab Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Mon, 2 Sep 2019 15:42:48 +0200
Subject: [PATCH] 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>
---
 lib/private/Http/Client/Client.php | 1 +
 1 file changed, 1 insertion(+)

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