From 92ab300859f0fc58a800cdc0b2e4db4edcb49606 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 21 May 2020 14:54:55 +1000 Subject: [PATCH] Use HttpRequestFactory::createMultiClient() This allows it to respect the proposed limit on HTTP request timeout. Bug: T245170 Depends-On: I8252f6c854b98059f4916d5460ea71cf4b580149 Change-Id: I1c3d96720709253ad15bb8528cdd132571de2e4e --- includes/ApiParsoidTrait.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/ApiParsoidTrait.php b/includes/ApiParsoidTrait.php index 0d5f58004b..37c9fecc13 100644 --- a/includes/ApiParsoidTrait.php +++ b/includes/ApiParsoidTrait.php @@ -88,7 +88,8 @@ trait ApiParsoidTrait { */ protected function getVRSClient() { if ( !$this->serviceClient ) { - $this->serviceClient = new VirtualRESTServiceClient( new MultiHttpClient( [] ) ); + $this->serviceClient = new VirtualRESTServiceClient( + MediaWikiServices::getInstance()->getHttpRequestFactory()->createMultiClient() ); $this->serviceClient->mount( '/restbase/', $this->getVRSObject() ); } return $this->serviceClient;