Skip to content

Commit a2b3803

Browse files
[HttpClient] fix last fix
1 parent 46d2832 commit a2b3803

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Response/AsyncResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ public static function stream(iterable $responses, float $timeout = null, string
206206
foreach ($client->stream($wrappedResponses, $timeout) as $response => $chunk) {
207207
$r = $asyncMap[$response];
208208

209-
if (null === $chunk->getError() && 0 === $r->offset) {
209+
if (null === $chunk->getError()) {
210210
if ($chunk->isFirst()) {
211211
// Ensure no exception is thrown on destruct for the wrapped response
212212
$r->response->getStatusCode();
213-
} elseif (null === $r->content && $chunk->isLast()) {
213+
} elseif (0 === $r->offset && null === $r->content && $chunk->isLast()) {
214214
$r->content = fopen('php://memory', 'w+');
215215
}
216216
}

0 commit comments

Comments
 (0)