Skip to content

Commit a39992f

Browse files
committed
fix(appstore): Make appstore timeout configurable
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
1 parent 3a687ea commit a39992f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/private/App/AppStore/Fetcher/Fetcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function fetch($ETag, $content, $allowUnstable = false) {
6767
}
6868

6969
$options = [
70-
'timeout' => 60,
70+
'timeout' => (int)$this->config->getAppValue('settings', 'appstore-timeout', '120')
7171
];
7272

7373
if ($ETag !== '') {

tests/lib/App/AppStore/Fetcher/FetcherBase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public function testGetMatchingETag(): void {
488488
->with(
489489
$this->equalTo($this->endpoint),
490490
$this->equalTo([
491-
'timeout' => 60,
491+
'timeout' => 120,
492492
'headers' => [
493493
'If-None-Match' => '"myETag"'
494494
]
@@ -565,7 +565,7 @@ public function testGetNoMatchingETag(): void {
565565
->with(
566566
$this->equalTo($this->endpoint),
567567
$this->equalTo([
568-
'timeout' => 60,
568+
'timeout' => 120,
569569
'headers' => [
570570
'If-None-Match' => '"myETag"',
571571
]
@@ -643,7 +643,7 @@ public function testFetchAfterUpgradeNoETag(): void {
643643
->with(
644644
$this->equalTo($this->endpoint),
645645
$this->equalTo([
646-
'timeout' => 60,
646+
'timeout' => 120,
647647
])
648648
)
649649
->willReturn($response);

0 commit comments

Comments
 (0)