Skip to content

Commit c1fcbee

Browse files
Merge branch '5.3' into 5.4
* 5.3: [HttpClient] fix segfault when canary is triggered after the curl handle is destructed [Workflow] Fix eventsToDispatch parameter setup for StateMachine
2 parents 7bec8a5 + 89aac61 commit c1fcbee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Response/TransportResponseTrait.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828
trait TransportResponseTrait
2929
{
30+
private $canary;
3031
private $headers = [];
3132
private $info = [
3233
'response_headers' => [],
@@ -41,7 +42,6 @@ trait TransportResponseTrait
4142
private $timeout = 0;
4243
private $inflate;
4344
private $finalInfo;
44-
private $canary;
4545
private $logger;
4646

4747
/**
@@ -176,13 +176,12 @@ public static function stream(iterable $responses, float $timeout = null): \Gene
176176
foreach ($responses as $j => $response) {
177177
$timeoutMax = $timeout ?? max($timeoutMax, $response->timeout);
178178
$timeoutMin = min($timeoutMin, $response->timeout, 1);
179+
$chunk = false;
179180

180181
if ($fromLastTimeout && null !== $multi->lastTimeout) {
181182
$elapsedTimeout = microtime(true) - $multi->lastTimeout;
182183
}
183184

184-
$chunk = false;
185-
186185
if (isset($multi->handlesActivity[$j])) {
187186
$multi->lastTimeout = null;
188187
} elseif (!isset($multi->openHandles[$j])) {

0 commit comments

Comments
 (0)