This commit is contained in:
2021-10-28 18:31:25 +08:00
parent c7f4b8a0f7
commit d52920418a
5 changed files with 15 additions and 49 deletions
+6 -3
View File
@@ -46,9 +46,12 @@ class JsonRpcPoolTransporter implements ClientInterface
public function sendRequest(RequestInterface $request): ResponseInterface
{
$content = $request->getBody()->getContents();
return (new Response())->withBody(
new Stream($this->request($this->getClient(), $content))
);
$response = $this->request($client = $this->newClient(), $content, false);
$this->pool->push(self::POOL_NAME, $client);
return (new Response())->withBody(new Stream($response));
}