Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f67e49c

Browse files
committed
[HttpClient] Fix error chunk creation in passthru
1 parent 4460eb4 commit f67e49c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Symfony/Component/HttpClient/Response/AsyncResponse.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(HttpClientInterface $client, string $method, string
6565
while (true) {
6666
foreach (self::stream([$response], $timeout) as $chunk) {
6767
if ($chunk->isTimeout() && $response->passthru) {
68-
foreach (self::passthru($response->client, $response, new ErrorChunk($response->offset, new TransportException($chunk->getError()))) as $chunk) {
68+
foreach (self::passthru($response->client, $response, new ErrorChunk($response->offset, $chunk->getError())) as $chunk) {
6969
if ($chunk->isFirst()) {
7070
return false;
7171
}
@@ -123,9 +123,6 @@ public function getInfo(string $type = null)
123123
return $this->info + $this->response->getInfo();
124124
}
125125

126-
/**
127-
* {@inheritdoc}
128-
*/
129126
public function toStream(bool $throw = true)
130127
{
131128
if ($throw) {
@@ -146,9 +143,6 @@ public function toStream(bool $throw = true)
146143
return $stream;
147144
}
148145

149-
/**
150-
* {@inheritdoc}
151-
*/
152146
public function cancel(): void
153147
{
154148
if ($this->info['canceled']) {

0 commit comments

Comments
 (0)