*/
const SINGLE_FILE_PATH = '/single';
- /**
- * Timeout for when the connection or the server is slow
- */
- const CHECK_TIMEOUT = 5;
-
/**
* @var GuzzleHttp\Client
*/
$url = $this->getRepositoryUrl() . $this->indexPath;
$client = $this->getGuzzleClient();
+ // Timeout should be a minimum of 10 seconds. See https://lab.civicrm.org/infra/ops/-/issues/1009.
+ $timeout = max(10, \Civi::settings()->get('http_timeout'));
try {
$response = $client->request('GET', $url, [
- 'timeout' => \Civi::settings()->get('http_timeout'),
+ 'timeout' => $timeout,
]);
}
catch (GuzzleException $e) {