File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Controller/Administration Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class Api
4949 */
5050 public function __construct (private readonly Configuration $ configuration )
5151 {
52- $ this ->setHttpClient (HttpClient::create (['max_redirects ' => 2 ]));
52+ $ this ->setHttpClient (HttpClient::create (['max_redirects ' => 2 , ' timeout ' => 30 ]));
5353 }
5454
5555 /**
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public function versions(): JsonResponse
8585 $ this ->userIsAuthenticated ();
8686
8787 try {
88- $ versions = HttpClient::create ()->request (
88+ $ versions = HttpClient::create ([ ' timeout ' => 30 ] )->request (
8989 'GET ' ,
9090 'https://api.phpmyfaq.de/versions '
9191 );
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public function downloadPackage(string $version): string
137137 {
138138 $ url = $ this ->getDownloadHost () . $ this ->getPath () . $ this ->getFilename ($ version );
139139
140- $ client = HttpClient::create ();
140+ $ client = HttpClient::create ([ ' timeout ' => 30 ] );
141141
142142 try {
143143 $ response = $ client ->request ('GET ' , $ url );
@@ -170,7 +170,7 @@ public function downloadPackage(string $version): string
170170 */
171171 public function verifyPackage (string $ path , string $ version ): bool
172172 {
173- $ httpClient = HttpClient::create ();
173+ $ httpClient = HttpClient::create ([ ' timeout ' => 30 ] );
174174 $ response = $ httpClient ->request (
175175 'GET ' ,
176176 DownloadHostType::PHPMYFAQ ->value . 'info/ ' . $ version
You can’t perform that action at this time.
0 commit comments