File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
app/code/Magento/ReleaseNotification
Model/ContentProvider/Http Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,21 @@ class HttpContentProvider implements ContentProviderInterface
32
32
private $ urlBuilder ;
33
33
34
34
/**
35
- * HttpContentProvider constructor.
36
35
* @param ClientInterface $httpClient
37
36
* @param UrlBuilder $urlBuilder
38
37
* @param LoggerInterface $logger
38
+ * @param int $requestTimeout
39
39
*/
40
40
public function __construct (
41
41
ClientInterface $ httpClient ,
42
42
UrlBuilder $ urlBuilder ,
43
- LoggerInterface $ logger
43
+ LoggerInterface $ logger ,
44
+ int $ requestTimeout = 30
44
45
) {
45
46
$ this ->httpClient = $ httpClient ;
46
47
$ this ->urlBuilder = $ urlBuilder ;
47
48
$ this ->logger = $ logger ;
49
+ $ this ->httpClient ->setTimeout ($ requestTimeout );
48
50
}
49
51
50
52
/**
Original file line number Diff line number Diff line change 30
30
<argument name =" pool" xsi : type =" object" >notificationPool</argument >
31
31
</arguments >
32
32
</type >
33
+ <type name =" Magento\ReleaseNotification\Model\ContentProvider\Http\HttpContentProvider" >
34
+ <arguments >
35
+ <argument name =" httpClient" xsi : type =" object" shared =" false" >Magento\Framework\HTTP\ClientInterface</argument >
36
+ <argument name =" requestTimeout" xsi : type =" number" >5</argument >
37
+ </arguments >
38
+ </type >
33
39
</config >
You can’t perform that action at this time.
0 commit comments