mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 01:44:45 +02:00
Allow adjusting timeout
This commit is contained in:
parent
03e1733b7d
commit
b6d39c66d1
@ -13,10 +13,13 @@ class DaemonConfigurationRepository extends DaemonRepository
|
||||
*
|
||||
* @throws \App\Exceptions\Http\Connection\DaemonConnectionException
|
||||
*/
|
||||
public function getSystemInformation(?int $version = null): array
|
||||
public function getSystemInformation(?int $version = null, $connectTimeout = 5): array
|
||||
{
|
||||
try {
|
||||
$response = $this->getHttpClient()->get('/api/system' . (!is_null($version) ? '?v=' . $version : ''));
|
||||
$response = $this
|
||||
->getHttpClient()
|
||||
->connectTimeout($connectTimeout)
|
||||
->get('/api/system' . (!is_null($version) ? '?v=' . $version : ''));
|
||||
} catch (TransferException $exception) {
|
||||
throw new DaemonConnectionException($exception);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user