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
	 Lance Pioch
						Lance Pioch