diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php index 02c55ac9d9..e559cf83e6 100644 --- a/lib/private/App/AppStore/Fetcher/Fetcher.php +++ b/lib/private/App/AppStore/Fetcher/Fetcher.php @@ -85,7 +85,9 @@ abstract class Fetcher { return []; } - $options = []; + $options = [ + 'timeout' => 10, + ]; if ($ETag !== '') { $options['headers'] = [ diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index bd19141ea9..2cfb34a096 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -514,6 +514,7 @@ abstract class FetcherBase extends TestCase { ->with( $this->equalTo($this->endpoint), $this->equalTo([ + 'timeout' => 10, 'headers' => [ 'If-None-Match' => '"myETag"' ] @@ -585,6 +586,7 @@ abstract class FetcherBase extends TestCase { ->with( $this->equalTo($this->endpoint), $this->equalTo([ + 'timeout' => 10, 'headers' => [ 'If-None-Match' => '"myETag"', ] @@ -670,7 +672,9 @@ abstract class FetcherBase extends TestCase { ->method('get') ->with( $this->equalTo($this->endpoint), - $this->equalTo([]) + $this->equalTo([ + 'timeout' => 10, + ]) ) ->willReturn($response); $response->method('getStatusCode')